-
Notifications
You must be signed in to change notification settings - Fork 492
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 German translation #2243
base: prepare-for-language-translations
Are you sure you want to change the base?
Add German translation #2243
Conversation
like "Payee" and "UUID" to maintain compatibilty with existing journals when using a different locale as prior to this change Ledger would only recognize the translation of "Payee" or "UUID".
@@ -126,6 +126,8 @@ string post_t::payee_from_tag() const | |||
{ | |||
if (optional<value_t> post_payee = get_tag(_("Payee"))) | |||
return post_payee->as_string(); | |||
else if (optional<value_t> post_payee = get_tag("Payee")) | |||
return post_payee->as_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume someone has a Ledger journal and has made use of the special metadata tag Payee
. With the changes in this PR they are able to make Ledger speak German.
Without this change their journal would no longer recognize the English Payee
keyword they have in their journal as Ledger would look for the German equivalent, i.e. Empfรคnger
.
Therefore I believe Ledger should always support and recognize the English name of special metadata tags.
@@ -0,0 +1,2393 @@ | |||
# German translations for Ledger package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several words like commodity
have not (yet) been translated. This was already quite a bit of work as it is and my brain went ๐ป while thinking in English when working on this PR and switching to translation mode when expanding on this file.
Ich denke wirklich nicht, dass ich qualifiziert bin, um die รbersetzungen speziell zu รผberprรผfen, obwohl ich die Code-รnderungen gutheiรe. Vielleicht kรถnnte ein anderer Muttersprachler einschreiten und seine Zustimmung geben, wenn es fertig ist? |
Ich wusste gar nicht, daร Du so gut Deutsch sprichst, John! Heiรt das, daร ich die PR Beschreibungen zukรผnftig komplett in Deutsch schreiben kann? ๐ |
Ach, es gab eine Zeit, in der ich das genossen hรคtte. Wรคhrend meiner Highschool- und Collegejahre habe ich mit groรer Intensitรคt Deutsch gelernt und wollte tatsรคchlich nach Deutschland ziehen, um dort als Programmierer zu arbeiten. Doch dann vergingen die Jahre und es gab zu wenig Gelegenheiten, die Sprache hier in den Staaten anzuwenden. Und realistisch betrachtet ist es viel effizienter, wenn Deutsche mit mir auf Englisch kommunizieren, als wenn ich meine brรผchigen Sprachkenntnisse an ihnen ausprobiere. Und so habe ich am Ende den Groรteil meiner Fรคhigkeiten verloren. Glรผcklicherweise ist ChatGPT ein groรartiger Assistent, der mir hilft, die Lรผcken zu fรผllen, wo das Vergessen mich eingeholt hat, und zumindest kann ich das Ergebnis Korrektur lesen und sicherstellen, dass ich nicht wie ein verrรผckter Mensch klinge. And so yes, much better to continue in English, to avoid the inefficiency of translation getting in the way of a timely response. :) |
I came across an article "[o]n writing better error messages" recently and feel somewhat inspired to re-work the existing messages Ledger prints. My thinking is around coming up with a "scheme" for message-categories, i.e. how can error messages be differentiated linguistically from info messages. How would you feel about a PR that may or may not rewrite the majority of Ledger's messages, @jwiegley? โน๏ธ The article's essence is:
|
Can you show me a few examples? That would better help me determine if the heavy lift is worth your time... |
That is very considerate, @jwiegley, thank you. I believe it is worth the time to do soon, i.e. before folks volunteer to translate into other languages, as such a potentially large scale change will effectively require the re-translation. Here are some quick examples:
And maybe a first good take is consolidating use of 'Cannot' vs' Could not' and proper quoting of arguments within messages. I just had an interesting idea: We could use gettext to get a feel for rewording by simply providing po/en.po with different messages ๐ |
The latter two are definitely an improvement, but I find the top two to be more confusing. They don't directly inform the user about the mistake they made. By rephrasing it in terms of what would have worked, it can make the actual problem harder to spot... |
That's helpful feedback, John, how about we direct our attention to getting #2242 merged first, then can have a look at potential changes to the English messages for wording and consistency, and then come back to this PR? Is this acceptable for you? |
Oh yes, that sounds great, Alexis! Good work you're doing here, and I think it will be helpful to many once we hammer it out. |
This PR adds a very first (read: bad) translation of Ledger's messages to ๐ฉ๐ช. As a native speaker I should be able to do a better job (and will). Yet my focus for this PR was to get an impression on all (~500 ๐ฎโ๐จ) the Ledger messages and the infrastructure to support international languages in Ledger.
I will look for inspiration from translationproject, oftentime when developing (and thinking) in English it is hard for me to switch back and forth to German when trying to come up with good translation.
Please see below for inline comments and context about the changes.
One thing to emphasise are the changes related to handling special metadata tags, e.g.
Payee
undUUID
. Ledger currently allows these to be translated (and it does make sense) yet for compatibility I believe ledger should always recognize and support the English version.This is a companion PR that stacks on top of #2242.
Tested using nix ๐ฅณ:tada:
TODO