Replies: 12 comments 12 replies
-
I'll keep this as a placeholder for writing a guide or similar that we can link to elsewhere if needed. Currently you can have a look at this PR #4452 and the three files changed there to have an idea of what you need to do. In summary this is what needs to be done to add support for a new language from scratch:
|
Beta Was this translation helpful? Give feedback.
-
Related discussion on the Polish translation: #4486 |
Beta Was this translation helpful? Give feedback.
-
So after having assisted BlueRider on Discord with setting up everything, I realized that we should probably make a distinction about what a translator needs to do and what the devs should do. I think the best solution is to have people who want to translate deal the least amount possible with setting up stuff and compiling stuff. They should just worry about translating in the .po file. I'm trying to think of a way to facilitate this. Maybe someone who has everything setup could help them make the necessary changes to translation.cpp and the makefile in a separate branch that the translators can grab a build from. This way they would only really need to:
The reason they have to compile the This will all no longer be necessary once more characters are supported of course. |
Beta Was this translation helpful? Give feedback.
-
After having thought a while about ihhub's advice on Discord about telling translators to make use of the repo's CI\CD pipeline, I realize that the "only" setting up step strictly necessary for translators is to get a way to compile their POs to MOs. For Windows users this could be to setup Cygwin, which is still quite a hassle, not just the setting up, but also the usage of it, especially for someone not familiar with these things. If anyone knows an even more straightforward way to run MAKE and the other commands necessary to compile the MO in a Windows environment, then please share. In the spirit of keeping the required installations and the usage of space on a translator's PC to a minimum, using the repo's pipelines will at least spare translators from having to install an IDE, which is very overkill when you're just using it one time to make small changes to two files. However, they would still need a way to make their changes to the code and personally I think using a lightweight source code editor like Notepad++ is more than enough. |
Beta Was this translation helpful? Give feedback.
-
I'd like to make a few comments here that we discussed in the Translations Discord channel. We ran into a problem today with @zenseii's work on translating the shortened Artifact names (see #4436 for reference). One of the Artifacts has a full name in English less than 18 characters and thus it doesn't need a shortened version. Unfortunately, the full name translation in Norwegian exceeds 18 characters, and thus it would need a Short Name. Since the English string is used as a key for the translation string lookup, there isn't a way to shorten it yet. As such, we had to shorten the Full Name to less than 18 characters. I'm sure we're missing other Artifacts in other languages. One possible solution to this challenge would be to do the following:
Since there are other bonus types as well, such as Heroes, Spells, and Resources, we may also face some instances with these types beyond just Artifacts. I know we're trying to push towards a v1.0 release and not do any major refactoring of the codebase or translation strategy. I'm documenting this issue here so that we can address it at the proper time. I believe the work will be well worth the effort and enable us to be more nimble and responsive to other translation issues in the future. |
Beta Was this translation helpful? Give feedback.
-
Hi @zenseii and @pflugs30 , this is a good stuff and I'm fully supporting this. I'll prepare my notes about this and then we can start making a documentation file for any translator. |
Beta Was this translation helpful? Give feedback.
-
@pflugs30 and @ihhub I've made a quick draft of the documentation page just to sort the current points we have made and to make myself acquainted with how making wiki pages here works: It is very far from anything final, and I imagine like Ihhub said that we might have to make separate subpages for the various parts. I'm also waiting for ihhub to post his notes so that I can make adjustments according to them. |
Beta Was this translation helpful? Give feedback.
-
I just checked what packages are needed for cygwin on Windows to compile the .mo and they are: These are also all that are needed to make the .pot file. |
Beta Was this translation helpful? Give feedback.
-
The German translation is unfortunately still quite empty at the moment. Is there a way to somehow import most of the text from the German version? And to use this as a basis? |
Beta Was this translation helpful? Give feedback.
-
Hello folks, I've submitted #4895. This is meant to be a starting point to documenting some of the technical processes around updating translations and isn't exhaustive at all. Hopefully, this should address some of the points brought up in this discussion and can be iterated on to provide more support to translators. |
Beta Was this translation helpful? Give feedback.
-
I guess some you want the .po files as clean as possible, that there should be no # comments in the files. Max amount of recomended letters: 4Just a thought. |
Beta Was this translation helpful? Give feedback.
-
I found a minor inconsistency. Example Barbarian buildin The Coliseums description: Same as Sorceress buildin Rainbow But or for example the artifact Fizbin of Misfortune This is rather inconsistent and in my mind changed to the numerical use (1,2,3 etc). Also another thing several artifacts, doesn't tell in the descptions the value of their effects are. They just tell you what they incease the heroes morale but not by how much, so you have to right click in the stats to know. That information should be accessible just by right clicking in the artifact. I suggest that the actual values of the artifacts should be added in their descriptions. |
Beta Was this translation helpful? Give feedback.
-
Me and @pflugs30 figured it would be better to have this place to discuss matters regarding the translation of fheroes2 in current and future languages. This is all in relation to the current open issue #4516 about adding documentation for translators.
Generally speaking I believe the purpose of all of this should be to alleviate the core team's workload so that instead of doing mundane tasks like translation maintenance and support, they can focus on using their skills on more complex issues.
1. First of all we should probably figure out how and what to document with the core idea being that new translators should be able to pick up and translate the project as quickly as possible, as well as assure consistency between translations.
2. There's talk about having a list of translators and their languages so as to make it easier to know who to contact, both from a dev's perspective and a potential translator's.
3. We should also provide some notes about current state of things and stuff one should know and take into consideration when making the translation, or stuff you should avoid doing.
4. Also a quick summary of how to setup and test your translation is also useful, especially for people who might not have done anything like this before or never worked directly with code.
========================================================================================
So having said all that I can go a bit more in depth with each points I mentioned:
Thoughts on point 1 (press to drop down)
I believe the documentation should strive to be as concise as possible and as clear as possible since we don't know what background the person reading it has. It should probably include a short glossary of the different file types used (po. , mo. etc.) and the programs (poedit, notepad++) used and maybe some of the recurring terminology. Also people will be using different OSes so this will need to be accounted for.
Point 2:
A list of translators is a good idea and whether someone wants to be referenced by their pseudonym or something else, like just a link to their github, works too.
Thoughts on point 3 (press to drop down)
Some notes to this that I can already add are that currently any characters, accents, diacritics etc not found in the English set of characters used in the game will not currently be present in the game. Ex. an `É` might be presented as an `E`. How these are currently adapted is up to the translator essentially. Eventually support for all the characters etc is so far planned, but there are no ETAs.
What all of this means though is that when you're translating you should still write as you would in your language, because the program will take care of adapting these letters. This is to ensure that in the future when these charaters are available you won't need to go back and add them back to the translation - that would be a great waste of time.
Then there's the fact that you need to remember that the strings you are translating will be presented in the game and most likely will have to adhere to a limited area where it is used. Ex. right now for the values of speed you will need to make sure that your translation of ex. "Very Fast" isn't longer than 9 characters, or else the text will start to go outside the statistics windows, particularly for the creature info window where you have an additional number in parathesis: "(x)" following the speed value.
Thoughts on point 4 (press to drop down)
This point will also need to be specific for the OS since I'm not sure POedit exists outside of Windows (_Update: Poedit exists for Linux and Mac*_), or if it is even the best choice on Windows. As for setting up and building the fheroes2 source, this is already covered in the other documentation so a quick reference to that will be fine. It does need to be underlined that currently you will have to build it in order to test your translation in game. This has to do with both being able to apply the language, and with making sure the program recognizes your language's plural forms.
I guess one work-around might be to disguise your translation as another language that you know uses the same grammar for this stuff. Ex. a Danish translation could name its language file as if it were the Norwegian one (
nb.po
) and see how it looks in one of the releases without having to modify the code and build the project, but this will probably not be an option for most languages. I say this because most people might not be interested in nor have the time to set up a development environment and to learn how to use it.Beta Was this translation helpful? Give feedback.
All reactions