chrisboyle / sgtpuzzles

Android port of Simon Tatham's Puzzles
https://chris.boyle.name/puzzles
Other
583 stars 166 forks source link

Simplified Chinese translation #654

Open CloneWith opened 2 months ago

CloneWith commented 2 months ago

Hi, recently I've been working on the Simplified Chinese translation of this project, and I'm mainly translating interface strings in my fork. Could translations work properly currently?

chrisboyle commented 2 months ago

Sorry, there is currently no usable translation infrastructure in Puzzles to apply translations to the .c files, which contain all of the game logic and therefore most of the visible strings in the app. This is because of C's approach to memory management: a dynamically translated string is not straightforward to use where the original source code contains a string constant. A previous attempt to work around that turned out to be unsafe and caused crashes so I disabled it. I have an idea for a different mechanism for this but haven't found time to make any progress with it yet.