-
-
Notifications
You must be signed in to change notification settings - Fork 553
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: Add de_CH #1272
Translation: Add de_CH #1272
Conversation
Awesome, thanks 👍 Did you try if the language files are really necessary? I haven't tried yet, but would assume that de_CH falls back to use de if not available. |
What... no dialect?? just joking. ;-) |
This PR does actually does "nothing". All translations are 100% like the German version. Did you read https://www.kimai.org/documentation/translations.html#adding-a-new-language ? I worked on the PR and pushed some changes, but all configs are also the same. Besides that you can now select "Deutsch (Schweiz)" in the user profile, I don't see any benefit in this PR. Nothing changes compared to
What do you mean? What is fixed and how is it fixed if there is no difference to German? |
sorry for the "non-work". the cause for the added language is the java script. without having de-ch, we get wrong number formats, see #1080 (comment) and your answer for that. This changes the number format in invoices, and on the whole front end from ie. 1.637,90 to 1'637.90. Reading the docs for me it seemed that I have to add a "complete" language to achieve this , sorry if i was wrong about that. if there is a better solution, just close this PR, and I will try again. |
… as they are 100% the same like de and the fallback for de_CH is always de
Aha, so the number formats are fixed. Well, thats a good argument! |
Yes, the date formats are also the same. |
One can simply create a messages.de_CH.xliff file and only put that one translation into it. The nice thing is that the fallback to de still works. I just did, you can see how it works if you want to change other translations in the same manner: |
great, thanks for the information! the doc is not that clear about that, it states in "Adding a new language":
I will write an update to the doc and create another PR for this. |
Well, thats a special case because of the fallback from de_CH to de. Technically I wouldn't consider de_CH a "new" language, even though I am sure you would say something else ... especially when it comes to the spoken words 😀 Normally the fallback is always English. There are just a couple of translations were this special handling would be used (pt and pt_BR, de and de_CH/de_AT, some chinese "dialects" ...). But: yes, please go ahead with a docs PR! Its always good if someone actually using the docs reads and corrects it. When I write it, I already know what to do and therefor it might not include all necessary information. |
I would describe de_CH not as a new language, but as a lets say "very special" variant ;-) Is the "special handling" automatically used for every variant added, so if I added an fr_CH the fallback will be fr? |
Yes, the fallback is always the language code (fr) without the region code (CH). |
You can test the integration at https://demo-branch.kimai.org/de_CH/timesheet/ |
looks good. what's strange is that the number format is from ch-de even when the language setting is Deutsch and not Deutsch(Schweiz) - it seems as at least the number format on the frontend and the invoice derives from the browser language settings, if the browser language exists in in kimai JS - doesn't this make the settings in Kimai a bit inconsistent? |
All formatting should be exclusively taken from the current requests locale. It's harder to spot if the translations don't change. At least this changes the money formatting correct for me: Can you please check again if you still experience the problem, and if so describe in detail what is wrong and in which place. |
I checked again with lots of different settings of the browser and the application and you are absolutely right. It must have been that I accidentally reused an url from the browser history in one of the tests, all works perfectly as intended, sorry for the false alarm. |
No need to be sorry ;) qualified feedback is always very welcome! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai. |
Description
This pull request adds de_CH or Deutsch(Schweiz) to the available languages.
I had not to change any de translations for this, these seem ok for Switzerland too.
This also fixes the issue with some number separators.
Types of changes
Checklist
composer kimai:code-check
)