-
-
Notifications
You must be signed in to change notification settings - Fork 65
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 Ukrainian and Russian localizations #344
Conversation
Thanks! I also obviously approve of the change with the TranslationServer, anything that reduces the required maintenance without downsides is super welcome :P
You seem knowledgeable about this. Could you please make an issue about how to improve the translation system, especially if you can go into detail about the implementation and what makes it superior?
A warning was on my radar already, as the setting also can't work for web, I think. I'm going to need to find some way to test out if it works, and some way to display a warning in the setting. Not too trivial, so please make an issue, especially if you can think of the implementation details. |
Also, how do you want to be mentioned in AUTHORS.md? Do you want to have a real name or do you only want to be listed by your GitHub handle? |
As for credits, using "Volkov" is fine. If you wish, you can leave my contact email "[email protected]" (which I usually leave in software that I translated in case of feedback) in case someone might have questions about my translations or they have suggestions to make it better.
Well, I have one untested idea, so you can check in spare time:
(also, make sure to call this function ONLY once, don't call it again every time when user opens options menu) This might work, but I will consider that to be dirty hack. Maybe someone could open proposal to godot to add function to check if platform allow cursor moving?
(yeah, because I kinda of translator myself, you can check my profile and found that I often do software translations, especially GTK4 software that by default uses gettext system. Hence that how I learned about gettext and why people should use it instead of their csv/ini/etc formats.) I might even make pull request that will convert your csv to gettext, once I will have energy to do so. But TLDR: gettext (https://www.gnu.org/software/gettext/) is old, like around 40 years old. It was designed specifically in software translation in mind. And for this almost 40 years, gettext become standard. There many web translations service (like weblate, and you will see that they will support gettext.) or offline tools (arguably the best one is free and open source POEditor https://poeditor.com/) was made. Selling point of gettext:
Then go to project setting, to localization tab and then there you will see "POT generation": here you will provide what scripts and projects that you want to add and click Generate POT, which will prompt godot to save you somewhere pot file. Code above will produce something like this:
Where #: and path is where this string used (that it, if you will use same string with same context in several scripts, there will be several patches. If will allow translators to quickly open exactly source line where this strings will be used, so if they can't get context - they can try to guess it from your code. Also, you can do same to quickly found all scripts where particular string is used, which will make refactoring localization easier.) This means, that you can store translations in your code whatever you want: arrays, dictionaries, any other data format, whatever, your user will still get POT file that will always look same for them. And since entire source string used as identifier, it's mean that once you will change, that ID in every other language AUTOMATICALLY become "fuzzy" or in other words, outdated and will NOT be used. So, if we would our "a" string declaration to something like this: In csv there is no such option: your program will still try to load same key if translation file has one. So if translators didn't catch up or you won't manually remove outdated strings from their translations or simple change key manually - program will still use old string, that most likely will be 100% incorrect at that point. Also, with csv you need to ask translators or provide some script/tool to merge newly added strings with outdated translations, otherwise it will be hard to keep track for your translators of what was added and what doesn't. In gettext, you have merge tools. POEditor even has button for this, where you open translation file, pick "Update from POT", pick newly generated POT file and it will be merged with translation. All outdated strings will be marked as outdated or removed. Strings that need slight modifications will be marked as such. And as you can see, there no invention from your side here, except to generate POT file (which is so easy to do, that your translators can do that themself without any troubles, if they wish). So much easier then dealing with csv files.
The only real downside that even wiki mention, is that gettext might be slightly harder to grasp. And while you absolutely can edit po files by hand/text editors, it's recommended to use specialized software such as... (how much times I mentioned it?) Poeditor. So you might want to provide some documentation "how to translate my program" (which you should do anyway, but difference is that gettext docs might be slightly longer) where you will be practically required to ask translator to download that software. There probably other points that I forget to mention, but, in general, that's it. |
I opened an issue for the first thing. If you don't want to open an issue about translations, I can do it too, but I feel like you'd know how to detail things better. |
Thanks! |
FTR, mouse warping works on the Wayland backend like in many native applications. As you noted it's not guaranteed by the spec, but it works in most compositors and it's a common hack. I'm planning to propose a protocol change myself. There's a tracker for this issue on the wayland-protocols repo if you're interested: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/158 |
Co-authored-by: volkov <[email protected]>
Co-authored-by: volkov <[email protected]>
Co-authored-by: volkov <[email protected]>
So, several things:
So, as for main part of this PR: it seems that I didn't broken anything. I tested both translations and in overall it looks good. I might missed some typos here and there, but in overall it usable.