civfanatics / CQUI_Community-Edition

Civilization 6 mod - UI enhancements, reduce clicks and manage your empire faster!
MIT License
149 stars 28 forks source link

Translation issue #297

Closed Akionka closed 3 years ago

Akionka commented 3 years ago

Describe the bug Some texts in settings menu are rendered in English, though they are translated in files.

To Reproduce Steps to reproduce the behavior:

  1. Select Russian language
  2. Open CQUI settings

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

General informations

Additional context Add any other context about the problem here.

Akionka commented 3 years ago

Also there are more places where the mod is not translated and I would help with the translation

the-m4a commented 3 years ago

I would love some help with the translations! I have tried to use a thing on Azure to produce some text but it does not work all that great it seems. Your screen shot shows the CQUI settings, so we can start there...

If you're experienced with Git and want to clone the repo and then do a Pull Request, that works. If you're not familiar or comfortable with that and just want to compare XML files and paste in parts or all of an XML, that works too. I am happy to accept whatever you'd like to do.

If you want to look at the two files to compare: https://github.com/civfanatics/CQUI_Community-Edition/blob/main/Assets/Text/cqui_text_settings.xml https://github.com/civfanatics/CQUI_Community-Edition/blob/main/Assets/Text/cqui_text_settings_ru.xml

I did a quick compare, here are the tags in the English settings that are missing from the Russian translation (most of which are new to my last update... I didn't do all the localizing work :S ) LOC_CQUI_LENSES_AUTOAPPLYARCHAEOLOGISTLENS_TOOLTIP LOC_CQUI_LENSES_AUTOAPPLYBUILDERLENS_TOOLTIP LOC_CQUI_LENSES_AUTOAPPLYSCOUTLENS_EXTRA LOC_CQUI_LENSES_AUTOAPPLYSCOUTLENS_EXTRA_TOOLTIP LOC_CQUI_LENSES_AUTOAPPLYSCOUTLENS_TOOLTIP LOC_CQUI_LENSES_BUILDERDISABLEDANGEROUS LOC_CQUI_LENSES_BUILDERDISABLEDANGEROUS_TOOLTIP LOC_CQUI_LENSES_BUILDERDISABLENOTHING LOC_CQUI_LENSES_BUILDERDISABLENOTHING_TOOLTIP LOC_CQUI_REMOVE_HERESY LOC_CQUI_REST_HEAL LOC_CQUI_SPREAD_RELIGION

Akionka commented 3 years ago

I changed every Row node by Replace in _Assets\Text\cqui_text_settingsru.xml and everything (that is translated, Units and Trader Screen tabs for example) works perfectly fine. I am new to Civ VI and Civ VI modding, so I am not quite sure how this works.

Akionka commented 3 years ago

Also I checked logs when nodes are Row and here what I got: Database.log:

[1631001.043] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[1631001.043] [Localization]: While executing - 'insert into LocalizedText('Tag', 'Language', 'Text') values (?, ?, ?);'
[1631001.043] [Localization]: In XMLSerializer while inserting row into table insert into LocalizedText('Tag', 'Language', 'Text') with  values (LOC_CQUI_LENSES_AUTOAPPLYARCHAEOLOGISTLENS_TOOLTIP, en_US, Автоприменение линзы археолога когда выбран археолог., ).
[1631001.043] [Localization]: In XMLSerializer while updating table LocalizedText from file cqui_text_settings_ru.xml.
[1631001.043] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag

Modding.log:

[1631001.042] LocalizedText - Loading Assets/Text/cqui_text_settings_ru.xml
[1631001.043] Error parsing C:/Users/Akionka/Documents/My Games/Sid Meier's Civilization VI (Epic)/Mods/CQUI_Community-Edition/Assets/Text/cqui_text_settings_ru.xml
[1631001.043] Warning: LocalizedText - Failed loading XML.

And there are not such messages when nodes are Replace, so it seems like a solution for me.

Akionka commented 3 years ago

I researched the problem a little, it turned out that I just forgot to change the Language tag when translating the mod. I apologize for bothering you for no particular reason. Soon I will do a PR with translations.

the-m4a commented 3 years ago

no worries! and sounds good