Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Polish translations #56

Merged

Conversation

jrushlow
Copy link
Collaborator

@jrushlow jrushlow commented Feb 15, 2021

mirrors SymfonyCasts/reset-password-bundle#149

Context:

This link will expire in 1 year which in Polish is Link wygaśnie w ciągu 1 roku
This link will expire in 3 years which in Polish is Link wygaśnie w ciągu 3 lat
This link will expire in 5 years which in Polish is Link wygaśnie w ciągu 5 lat
This link will expire in 6 years which in Polish is Link wygaśnie w ciągu 6 lat
This link will expire in 17 years which in Polish is Link wygaśnie w ciągu 17 lat

the same context applies for month|months, day|days, hour|hours, minute|minutes

@jrushlow jrushlow added the Status: Needs Review Needs to be reviewed label Feb 15, 2021
<body>
<trans-unit id="1">
<source>%count% year|%count% years</source>
<target>%count% roku|%count% lat</target>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure is it correct translation. Can you write some sentence with this translation to understand your intention?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link will expire in 1 year || This link will expire in 3 years

I'm not fluent in Polish, so please feel free to correct this if it's wrong. Thanks @mwadon

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! In English, it would look like this:

This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.

Where the {{ }} part will be the translation - for example "1 year" or "3 years"` in English.

Thanks!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more complicated in Polish:

1 year - 1 rok
2,3,4 years - 2,3,4 lata
5,6,7... years - 5,6,7... lat

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not as simple in Polish as in English, but... I'm working on your above example.
1 rok
2 lata, 3 lata, 4 lata
5 lat, 6 lat and so on...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries @jrushlow, I wouldn't think that way. I know that this is how it works. I would do the same. Thank you for your time developing all of this and maintaining it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomas2411

It really depends on sentence translation. My translation (and not only my) was: Ten link wygaśnie za ..., so 1 rok is correct. In your translation (Link wygaśnie w ciągu ...) 1 roku is also correct. So have to take just one convention.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that is a bummer. OK, so probably this would be a better option to have 3 different forms as it is more popular. But should be the whole sentence put in translations too so that there are no problems like this in the future? I would be for this option. Put the whole sentence int the translation to get proper context or do not put it at all and leave it up to the developer how to proceed. So just leave getExpirationMessageData method and skip getExpirationMessageKey.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomas2411

It really depends on sentence translation. My translation (and not only my) was: Ten link wygaśnie za ..., so 1 rok is correct. In your translation (Link wygaśnie w ciągu ...) 1 roku is also correct. So have to take just one convention.

To me

  1. wygaśnie za is more exact: wygaśnie w ciągu sounds like a process of expiration (expires during a year…).
  2. With the wygaśnie za phrase the grammar gender of the following time term is easier to express/maintain in Polish because of the accusative form that coincides with the nominative one: "rok", "miesiąc", "tydzień", "dzień" and so on have no suffixes (za rok => w ciągu roku) nor fancy declesions (za tydzień => w ciągu tygodnia, za miesiąc => w ciągu miesiąca); but: godzina [hour]: za godzinę > w ciągu godziny.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but as wrote above I recommend to use the full sentence in the translation or do not translate it at all in the bundle and leave the whole to the developer. Both solutions would be good so that we do not have to spend time on discussions like these :)

@jrushlow
Copy link
Collaborator Author

@marmichalski any chance you could verify these translations if you have some free time? Thanks in advance!

<body>
<trans-unit id="1">
<source>%count% year|%count% years</source>
<target>%count% roku|%count% lat</target>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more complicated in Polish:

1 year - 1 rok
2,3,4 years - 2,3,4 lata
5,6,7... years - 5,6,7... lat

src/Resources/translations/VerifyEmailBundle.pl.xlf Outdated Show resolved Hide resolved
@stof
Copy link

stof commented Feb 17, 2021

@weaverryan any reason to use the old Symfony-specific format in the bundle rather than the ICU format ? The bundle requires Symfony 4.4+, so it has access to the ICU format

@Inscure
Copy link

Inscure commented Mar 21, 2021

It would be nice to be able to use this code already :) When are you planning to merge and release new version?

@weaverryan
Copy link
Contributor

@weaverryan any reason to use the old Symfony-specific format in the bundle rather than the ICU format ? The bundle requires Symfony 4.4+, so it has access to the ICU format

@stof - probably not :). Though I personally understand the new format less. We were kind of following the standard in Symfony itself.

@jrushlow it looks like this has a review on it - so we could use that to push things forward.

@jrushlow jrushlow force-pushed the feature/polish-translations branch from 4951abb to 26fbb60 Compare March 29, 2021 17:54
@weaverryan weaverryan merged commit aa840ff into SymfonyCasts:master Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants