Project Hospital
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Translation guide

+9
Dysp
Galanthus
EuRoo
JackHuang
Wafthrudnir
pangio
87jesion
lokatronao
jan.oxymoron
13 posters
Go down
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Translation guide

Thu Oct 04, 2018 4:40 pm
Message reputation : 100% (3 votes)
Project Hospital Translator's guide

Hi translators! Looks like everything is finally ready for the translations to start.

We chose to go with github as the platform to store and edit the files.
You can find all the source English files and one example of translations (Czech) on our repository:

https://github.com/jan-oxymoron/project-hospital-translations

How to prepare the language files:
There are already files prepared for the following languages:

  • German (which I used it to get screenshots for this guide)
  • Italian
  • Spanish
  • Russian
  • (French is handled by the Scribio team)

We could add a few more, but this guide should allow people to add new languages independently.

You can download the whole repository to your computer, copy the English files to a new folder, then:

  • Change "En" in the file names to the code for your language
  • Change "En" in the file headings
  • Fill in the translated name of your language (this will be shown directly in the game)
  • Fill your name as a contributor Smile


Code:

    <GameDBStringTable ID="LOC_DE_UI">
        
        <LanguageCode>de</LanguageCode>
        <LanguageNameLocalized>Deutsch</LanguageNameLocalized>

        <Contributors>
            <Name>Fill your names!</Name>
        </Contributors>

Then, to upload the files so others can start collaborating on the translations of your language:

Create a new folder - click "Create new file" and type, for example for German: language_pack_de/readme.txt

Translation guide Loc_fo10

Then you can upload your files to this folder. Any changes done on Github will create a "pull request" which we'll try to accept as quickly as possible (there will be a few people handling this).

Editing
Feel free to edit the files directly on Github (browse to the file, 'pencil' icon top right) and we'd suggest to discuss here on the forum who is going to translate which file.
Again, committing the changes on Github will create a "pull request" which we'll try to accept as quickly as possible (there will be a few people handling this).
If you'd like to edit the files on your desktop, make sure you use an editor that understands xml, something like (free) Notepad++.

Note: if needed, we can expand the guidelines for working with github, let us know.

Steam keys

We're offering up to 5 keys for each language so you're able to test your translations directly in the game.
The rule will be that everybody who submits a translated file will be eligible to get a key as long as there are any left for the language (we mostly have less than 5 volunteers for all languages, so no need to race for it, and we can always make an exception Smile

PM josef.oxymoron or jan.oxymoron for your keys.

Testing in game:

Find the Streaming Assets folder in your game install folder and copy all the files to a separate folder under Addons. Don't forget the xmls need to sit in a Database subfolder:
Translation guide Loc_te10

Best practices for the texts

  • Try to keep similar length as the English original
  • For names shown in patient card or the building mode catalogue, try to make them really short so they fit on two lines. Using abbreviations is an option, extra info can be in the matching description / tooltip.

There are some formatting options available, like \n for new line and the following tags for bold/italics.
Code:

<![CDATA[Now <b><i>do something</i></b>.\nThis is on the next line.]]>
Make sure you don't break the start/end markers
Code:

<![CDATA[
and
Code:

]]>

Some texts have parameters like {1} and {2}, which means names or bits of other texts get inserted into them - make sure these stay there! Smile


Last edited by jan.oxymoron on Fri Oct 05, 2018 8:48 am; edited 4 times in total
avatar
lokatronao
intern
Posts : 4
Reputation : 0
Join date : 2018-09-03

Translation guide Empty Re: Translation guide

Thu Oct 04, 2018 5:26 pm
I think that more guidelines are needed to use github. Very Happy
avatar
87jesion
intern
Posts : 5
Reputation : 2
Join date : 2018-06-11
Location : Poland

Translation guide Empty Polish transation on GItHub

Thu Oct 04, 2018 6:13 pm
Hi
How to create a folder on GitHub for polish translation?
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Re: Translation guide

Thu Oct 04, 2018 6:33 pm
87jesion wrote:Hi
How to create a folder on GitHub for polish translation?

I created it, it's probably faster this way (but the guide mentions that, it's automatically added by creating a file, so in this case by typing "localization-pack-pl/readme.txt").
pangio
pangio
intern
Posts : 3
Reputation : 0
Join date : 2018-10-01
Location : Argentina

Translation guide Empty Re: Translation guide

Thu Oct 04, 2018 11:31 pm
i edited all the headlines for the latin american spanish translations, after my "create file" proposal gets accepted will i be able to upload the contents i edited to it?
avatar
Wafthrudnir
resident
Posts : 22
Reputation : 2
Join date : 2018-08-24

Translation guide Empty Re: Translation guide

Thu Oct 04, 2018 11:32 pm
Hey, i've uploaded my first file, not sure if i've uploaded correctly (sorry i have no experience with coding). I tried to create new file for portuguese localization, with limited success. I'll wait for the acceptance of my "pull request" before proceding further, just to make sure i'm doing it right.
avatar
JackHuang
intern
Posts : 4
Reputation : 0
Join date : 2018-08-21

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 7:50 am
i would like to help traditional chinese translation, but i never use github before, I am not sure did i create a new language file for CHT or not after i click “create a new file” , so pls helps me , this!
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 8:16 am
pangio wrote:i edited all the headlines for the latin american spanish translations, after my "create file" proposal gets accepted will i be able to upload the contents i edited to it?

Hi, all looks good, we accepted the pull request and all the files are now available in the main repository. Thanks!

Wafthrudnir wrote:Hey, i've uploaded my first file, not sure if i've uploaded correctly (sorry i have no experience with coding). I tried to create new file for portuguese localization, with limited success. I'll wait for the acceptance of my "pull request" before proceding further, just to make sure i'm doing it right.
JackHuang wrote:i would like to help traditional chinese translation, but i never use github before, I am not sure did i  create a new language file for CHT or not after i click “create a new file” , so pls helps me , this!

No worries, I can prepare at least the base files for Portuguese and traditional Chinese.
avatar
EuRoo
intern
Posts : 5
Reputation : 0
Join date : 2018-09-13
Location : Netherlands

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 8:53 am
Would be great to help out with the Dutch translations. As it is all publically accessible, can anyone contribute or am I only meant to contribute once accepted into the translations sub-group?

In regard to above, sorry if I wasn't meant to, but I made all the base files for the Dutch translation yesterday and submitted them through the 'create new file' (for the first file) and 'upload files' for the others yesterday, but feel like something went wrong with the pull request as the whole request seems to be gone now. Will await your response to see whether I can be involved or not and whether I might have incorrectly put through the pull request.

Thanks.
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 10:24 am
jan.oxymoron wrote:
pangio wrote:i edited all the headlines for the latin american spanish translations, after my "create file" proposal gets accepted will i be able to upload the contents i edited to it?

Hi, all looks good, we accepted the pull request and all the files are now available in the main repository. Thanks!

Wafthrudnir wrote:Hey, i've uploaded my first file, not sure if i've uploaded correctly (sorry i have no experience with coding). I tried to create new file for portuguese localization, with limited success. I'll wait for the acceptance of my "pull request" before proceding further, just to make sure i'm doing it right.
JackHuang wrote:i would like to help traditional chinese translation, but i never use github before, I am not sure did i  create a new language file for CHT or not after i click “create a new file” , so pls helps me , this!

No worries, I can prepare at least the base files for Portuguese and traditional Chinese.

The folders are up:

  • https://github.com/jan-oxymoron/project-hospital-translations/tree/master/localization-pack-ptbr
  • https://github.com/jan-oxymoron/project-hospital-translations/tree/master/localization-pack-zhtw
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 10:30 am
EuRoo wrote:Would be great to help out with the Dutch translations. As it is all publically accessible, can anyone contribute or am I only meant to contribute once accepted into the translations sub-group?

In regard to above, sorry if I wasn't meant to, but I made all the base files for the Dutch translation yesterday and submitted them through the 'create new file' (for the first file) and 'upload files' for the others yesterday, but feel like something went wrong with the pull request as the whole request seems to be gone now. Will await your response to see whether I can be involved or not and whether I might have incorrectly put through the pull request.

Thanks.

Hi, anybody is allowed to contribute, but we're using the forum to organize the process and also give out keys. Btw - I've added you to the translators group. Smile

Regarding the pull request, I can't see it but if you still have the files on a branch, you can probably create a new one. What's your username on github?
avatar
Galanthus
resident
Posts : 16
Reputation : 1
Join date : 2018-09-01

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 10:55 am
lokatronao wrote:I think that more guidelines are needed to use github. Very Happy

Agree, I'm confused as to how I contribute to an already existing translation.
avatar
Galanthus
resident
Posts : 16
Reputation : 1
Join date : 2018-09-01

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 11:07 am
Also, do you want/need the items within LocID to be translated as well or only the items in text?
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 11:10 am
Galanthus wrote:Also, do you want/need the items within LocID to be translated as well or only the items in text?

Hi, the LocIDs are what the game uses to look up a text, so these need to stay the same - only the strings between <Text></Text> are relevant. Check some of the Czech files as an example.
avatar
Galanthus
resident
Posts : 16
Reputation : 1
Join date : 2018-09-01

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 11:17 am
jan.oxymoron wrote:
Galanthus wrote:Also, do you want/need the items within LocID to be translated as well or only the items in text?

Hi, the LocIDs are what the game uses to look up a text, so these need to stay the same - only the strings between <Text></Text> are relevant. Check some of the Czech files as an example.

Perfect. That is what I assumed - but wanted to make sure Smile
avatar
Galanthus
resident
Posts : 16
Reputation : 1
Join date : 2018-09-01

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 12:51 pm
Is there a sub-thread to discuss the English localization, in case any phrasing or choice of words confuse us and we need help (other than checking within the game) to clear it up?

Like for instance, I came across this phrase in the tutorial:
If you want to be kept in the loop, you must keep the patient under your care or se monitored. The same icon switches between all the modes.

And I'm not sure what "se monitored" means here. Should it be "select monitored"?
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 2:21 pm
Galanthus wrote:Is there a sub-thread to discuss the English localization, in case any phrasing or choice of words confuse us and we need help (other than checking within the game) to clear it up?

Like for instance, I came across this phrase in the tutorial:
If you want to be kept in the loop, you must keep the patient under your care or se monitored. The same icon switches between all the modes.

And I'm not sure what "se monitored" means here. Should it be "select monitored"?

Hi, I started a new thread for this very reason - https://projecthospital.forumotion.com/t577-english-localization-status#2507.

The sentence should've read:
"...keep the patient under your care or as monitored"
avatar
EuRoo
intern
Posts : 5
Reputation : 0
Join date : 2018-09-13
Location : Netherlands

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 2:30 pm
jan.oxymoron wrote:Hi, anybody is allowed to contribute, but we're using the forum to organize the process and also give out keys. Btw - I've added you to the translators group. Smile

Regarding the pull request, I can't see it but if you still have the files on a branch, you can probably create a new one. What's your username on github?

Thank you for adding me to the usergroup Jan!
I still had the files in a branch and put through another pull request. I believe it's visible now. My username on Grithub is EuRo0.

Thanks again.
avatar
Dysp
Moderator
Posts : 86
Reputation : 12
Join date : 2018-03-29
Age : 36
Location : Denmark

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 3:43 pm
If you have any issues, please come to Discord and ask for help:

https://discord.gg/HRyDY7q
avatar
Guest
Guest

Translation guide Empty Re: Translation guide

Fri Oct 05, 2018 6:59 pm
Hi.
I would help with the german Translation if needed, but I am a little bit confused, what to do first now. Just start editing or do I have to note something?
avatar
Galanthus
resident
Posts : 16
Reputation : 1
Join date : 2018-09-01

Translation guide Empty Re: Translation guide

Sat Oct 06, 2018 9:16 am
Morning. Ready for some more translations today!

Also, tip, learn from my mistake... After meticulously translating a third of a document and you go to make a pull request on it? Be sure to also hit the button. Yeah. That big green on at the top that ACTUALLY sends your pull request after showing you (and just you) the changes you've just made.

--- This is why I wanted to find a program that I could import the full document into without losing the formatting. Rule number one in IT: Backup. Rule number two: Backup. And rule number three: BACKUP!

Oh well. At least it was just the the tutorial, which I found out may get rewritten a bit anyway.

Now. Coffee. Laughing
josef.oxymoron
josef.oxymoron
developer
Posts : 80
Reputation : 51
Join date : 2018-04-12
http://oxymoron.games/projecthospital/

Translation guide Empty Re: Translation guide

Sat Oct 06, 2018 7:58 pm
Guys, I have an addition to what Galanthus wrote. A few of you already encountered crash through broken xml. Having backup is really important. Here's an example:

Example of an error in case of a broken file:

XmlException: 'Text' is expected file:.../StreamingAssets/Addons/SOME_LANGUAGE/Database/StringTableLaUI.xml Line 31, position 149.
The problem was this: " ... funcional/Text> "

You can find these errors in the log, probably in one of these flocations:
…(InstallFolder under Steam)\ProjectHospital_Data\output_log
C:\Users\USERNAME\AppData\LocalLow\Oxymoron Games\ProjectHospital\
avatar
Galanthus
resident
Posts : 16
Reputation : 1
Join date : 2018-09-01

Translation guide Empty Re: Translation guide

Sun Oct 07, 2018 8:54 am
I don't remember who suggested it, maybe it was Jan, but notepad++ seems to work with keeping the format for when you want to backup your translation Smile
avatar
JackHuang
intern
Posts : 4
Reputation : 0
Join date : 2018-08-21

Translation guide Empty Re: Translation guide

Mon Oct 08, 2018 5:48 pm
Translation guide Fe586210
It seems there is a problem after adding new things at today’s update. Like the picture shows the option “show Keyboard controls” or “顯示鍵盤控制” in my language it would block the other option button! Devs may need to check it, pls! thanks for your help!
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 336
Join date : 2018-03-23

Translation guide Empty Re: Translation guide

Mon Oct 08, 2018 6:01 pm
JackHuang wrote:
It seems there is a problem after adding new things at today’s update. Like the picture shows the option “show Keyboard controls” or “顯示鍵盤控制” in my language it would block the other option button! Devs may need to check it, pls! thanks for your help!

Hi, don't worry about the options menu, it will change to most likely a scrollable list, so there won't be any overlaps.
Btw - do the glyphs look ok in the bold version of the font or do they get merged together?
Sponsored content

Translation guide Empty Re: Translation guide

Back to top
Permissions in this forum:
You cannot reply to topics in this forum