Repository navigation
Translation zh_CN - #2757
Translation zh_CN#2757
Conversation
0428655 to
c70f097
Compare
|
HI Jack, .mo files are not used Can you post a screen shot or two? I'd like to see it. Are you able to translate it the way that you would like? Did you have any problems where you aren't able to make the translation well? I am not sure what policy hledger will use for accepting translations, but can you confirm that it is working well for you? |
3f7bb28 to
d89bf41
Compare
d89bf41 to
bcc24c1
Compare
Signed-off-by: Chunhui Ouyang <jack9603301@qhjack.top>
|
I cleaned up the commit history. there were a lot of inexplicable commits adding the It should be fine now. |
|
we should be able to alter the source code so that both english and Chinese (and German) can be represnted properly. Can you look at how you would change the source? It is probably a common problem and you can google how other people have handled it using gettext? |
I apologize, but since it is neither C/C++ nor any procedural or object-oriented language similar to them—and although I have used Typst (which is a fine typesetting system based on functional programming principles), I ultimately could not adapt well to Haskell's obscure and difficult development style—I am unable to truly grasp Haskell development. I intend for this PR to be editable by anyone. if you or others are willing, you are welcome to make edits and submit new changes to the PR's branch. I would be happy to join the discussion. A simple approach is to adopt a strategy similar to using injection points: for instance, when the program enters a non-English translation mode, it generates specific injection tags based on variables such as the year, month, or day. Under a 2008 income statement view, a |
|
In theory, hledger can send context with tags, so we can almost certainly
accommodate what is needed (after all, there are many
successfully translated websites!)
I'd be glad to work with you on it, but I'd like to focus on completing the
steps to release hledger2 first.
…On Wed, Sep 30, 2026 at 7:32 AM Chunhui Ouyang ***@***.***> wrote:
*jack9603301* left a comment (hledgerorg/hledger#2757)
<#2757 (comment)>
we should be able to alter the source code so that both english and
Chinese (and German) can be represnted properly. Can you look at how you
would change the source? It is probably a common problem and you can google
how other people have handled it using gettext?
I apologize, but since it is neither C/C++ nor any procedural or
object-oriented language similar to them—and although I have used Typst
(which is a fine typesetting system based on functional programming
principles), I ultimately could not adapt well to Haskell's obscure and
difficult development style—I am unable to truly grasp Haskell development.
I intend for this PR to be editable by anyone. if you or others are
willing, you are welcome to make edits and submit new changes to the PR's
branch.
I would be happy to join the discussion. A simple approach is to adopt a
strategy similar to using injection points: for instance, when the program
enters a non-English translation mode, it generates specific injection tags
based on variables such as the year, month, or day. Under a 2008 income
statement view, a year_unit tag would be inserted while other injection
tags remain unused. This allows the program to load the correct translation
file based on parameters and respond to user input.
—
Reply to this email directly, view it on GitHub
<#2757?email_source=notifications&email_token=AAFLBHCEOE3U3MP3G6E7OCD5RUKPLA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJRGMZDSOBSGUZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5913298252>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFLBHGHQOB4ANOFUR4QJQL5RUKPLAVCNFSNUABDKJSXA33TNF2G64TZHM4TGMBRGQYTIO2JONZXKZJ3GU3DINJVHE2DAMRVUF3AE>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAFLBHFCQMRBPWL4LJR6ONT5RUKPLA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJRGMZDSOBSGUZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AAFLBHD2GDJHBHUCWORH4ML5RUKPLA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJRGMZDSOBSGUZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you commented.Message ID:
***@***.***>
|
|
@acinader Of course, let's wait for the initial translation to be merged first. |
|
This is great, thank you very much! |
|
Thanks |
|
Oops, I should have tested first. These aren't working yet:
|
That's strange; I’m pretty sure I tested it. |
|
I tested hledger again, and it reads and executes the translations correctly. |
|
On your machine, maybe it correctly detected your locale by another method. I have pushed fixes now which apparently follow conventions and should make --lang work as expected on all machines. |
|
To be more precise: all of these now work with |
|
And now I've pushed some followup improvements to the tools/process:
|
|
(@acinader: we could check the pot file as part of CI, requiring all PRs which change output strings to update the .pot as well, but I haven't gone that far. Do you think we should ?) |
I highly doubt you can do that, because the absence of a translation entry in the .po file does not mean the translation file itself is invalid. |
|
You misunderstood; by checking the pot file, I mean checking that all the translatable texts in the code are present in the pot file, so that translators working on po files will see the correct status. This is a check we can do automatically. |
oh Thank you for the clarification. |


imp: Add translation support for Simplified Chinese.
This PR adds translation files for Simplified Chinese (zh_CN).
In accordance with PO standards, frameworks that follow this convention typically use compiled
.mofiles. however, Hledger does not appear to do so. If you do not need them, please let me know, and I can remove the.mofiles.