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

🌎 [Translation tool] lv - Latvian #2091

Closed
NihilScio opened this issue May 20, 2020 · 1 comment · Fixed by #2274
Closed

🌎 [Translation tool] lv - Latvian #2091

NihilScio opened this issue May 20, 2020 · 1 comment · Fixed by #2274
Assignees
Labels
help wanted We need help on this issue to find a solution translation Rely to internationalization
Milestone

Comments

@NihilScio
Copy link

English lv comments
2 years 2 gadiem 2 gadi / Because '2 gadiem' is Dativum and it means 'For whom' .. 'For 2 years'
2 months 2 mēnešiem 2 mēneši .. Because '2 mēnešiem' means 'for 2 months'.
1 month 1 mēneša 1 mēnesis
a month mēneša mēnesis
2 weeks 2 nedēļām 2 nedēļas
1 week 1 nedēļas 1 nedēļa
2 days 2 dienām 2 dienas
2d 2 dienām 2 d.
1 day 1 dienas 1 diena
2 hours 2 stundām 2 stundas
1 hour 1 stundas 1 stunda
2 minutes 2 minūtēm 2 minūtes
2 seconds 2 sekundēm 2 sekundes
1 second 1 sekundes 1 sekunde
January janvārī janvāris. Because 'janvārī' means where (Lokativum) - 'in January'
February februārī februāris
March martā marts
April aprīlī aprīlis
May maijā maijs
June jūnijā jūnijs
July jūlijā jūlijs
August augustā augusts
September septembrī septembris
October oktobrī oktobris
November novembrī novembris
December decembrī decembris
2 hours before 2 stundas pirms pirms 2 stundām

In Latvian prepositions like 'in' are shown at the end of the noun. For instance, 'January' is in Nominativum - 'Janvāris'. However, if you would like to say 'I started a project in January' - you would have to say '.. janvārī', and 'ī' shows 'in'. In the January'.

If it helps, I'm ready to assist with Latvian translation also further. Just write me an email.

@kylekatarnls
Copy link
Collaborator

kylekatarnls commented May 21, 2020

Hello, thanks a lot for your help.

Months are very likely to be displayed in date (in the future, the past, in recurrences).

And in order to have a different translation of "2 hours" according to the context (2 stundas/2 stundām with "before"), we use a declension system.

See for instance:
https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Lang/cs.php

It uses 'month_ago' měsícem while 'month' is měsíc.

And there are closure functions for before/after that take the time and transform it according to the language declensions.

Latvian already have after/before declensions:
https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Lang/lv.php

But we don't have particular translation for "for" (if you're talking about "how long it last"). Actually we can't know the user will put the duration in a sentence using "for". We would have to provide an additional diffForHumans() option for that.

Else you can see the result of the translation in the tests:
https://github.com/briannesbitt/Carbon/blob/master/tests/Localization/LvTest.php

For example, you can see "Tomorrow at (time)" is not translated. This would need to add the calendar array in lv.php (see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Lang/fr.php#L71 as an example)

If you can add missing translations and fix the translation file either on the source file or the test file, it would be awesome. If you can do only once, I can handle the other according to your fixes.

@kylekatarnls kylekatarnls added the translation Rely to internationalization label May 21, 2020
@kylekatarnls kylekatarnls changed the title [Translation tool] lv [Translation tool] lv - Latvian May 21, 2020
@kylekatarnls kylekatarnls pinned this issue May 21, 2020
@kylekatarnls kylekatarnls added the help wanted We need help on this issue to find a solution label May 24, 2020
@kylekatarnls kylekatarnls added this to the 2.36.0 milestone May 28, 2020
@kylekatarnls kylekatarnls removed this from the 2.36.0 milestone Jul 1, 2020
@kylekatarnls kylekatarnls changed the title [Translation tool] lv - Latvian 🌎 [Translation tool] lv - Latvian Jul 23, 2020
This was referenced Feb 1, 2021
@kylekatarnls kylekatarnls added this to the 2.45.0 milestone Feb 4, 2021
kylekatarnls added a commit that referenced this issue Feb 4, 2021
* Fixing Latvian localization tests - days of week, diff.

* Fixing Latvian localization tests - adding time prefix after day of week.

* This test is identical to `LvTest` except for the locale.

* Fixing Latvian localization tests - incorrect grammar.
"Pirms" can only be used as a prefix, but for consistency's sake I'm choosing to use the opposite of "vēlāk".

* Fixing Latvian localization tests - whole lot of gibberish.
This makes the Latvian localization complete as far as I can see, though the tests are lacking.

* Apparently this should be without time.

* Making this PHPDoc a bit more English.
+ a parameter rename that was done by one of the QC tools.

* Shouldn't have removed these.
This is one of the things that is missing test coverage.

* Remove trailing spaces

* Set explicit expectation for lv_LV

Co-authored-by: kylekatarnls <kylekatarnls@gmail.com>
@kylekatarnls kylekatarnls unpinned this issue Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We need help on this issue to find a solution translation Rely to internationalization
Projects
None yet
2 participants