Fixes https://bugs.kde.org/show_bug.cgi?id=305677
BUG: 305677
pino | |
adrianchavesfernandez |
Localization |
Fixes https://bugs.kde.org/show_bug.cgi?id=305677
BUG: 305677
Successfully run Lokalize after the changes, but did not actually test the change, I’m just assuming it will work
No Linters Available |
No Unit Test Coverage |
Buildable 17145 | |
Build 17163: arc lint + arc unit |
I do not think this solution is correct. The project ID is set by the user, so translating it with i18n() will simply not work.
The ID is specified in the configuration:
$ grep -A2 ProjectID src/project/projectbase.kcfg <entry name="ProjectID" type="String"> <default>default</default> </entry>
So at most that should be translatable. Translating any existing value is a bad idea.
PS: the "Fixes <URL of bug>" is redundant in the commit message, as there is "BUG:" already.
src/lokalizemainwindow.cpp | ||
---|---|---|
57 ↗ | (On Diff #66609) | it is already included few lines above... |
I don’t think extraction will work, come to think of it. The corresponding CPP file is generated on the fly.
https://techbase.kde.org/Development/Tutorials/Localization/i18n_Challenges#Translating_UI.2C_RC.2C_and_KCFG_files did not make it clear for me how to properly internationalize this value either. Anyone can clarify or link some other source of documentation for this?
$EXTRACTRC find . -name \*.ui -o -name \*.rc -o -name \*.kcfg >> rc.cpp
It's already in Messages.sh
Yes, but what is the right way to mark a string within a KCFG file to be translated? What I did, <default code="true">i18n("default")</default>, does not look like the right way. I would expect an XML attribute or element.
That is the correct way :)
(kdesrc) tsdgeos@xps:~/devel/kde/lokalize:master$ arc patch D24140 Created and checked out branch arcpatch-D24140. S'està comprovant el pedaç src/project/projectbase.kcfg... El pedaç src/project/projectbase.kcfg s'ha aplicat netament. COMMITTED Successfully committed patch. (kdesrc) tsdgeos@xps:~/devel/kde/lokalize:arcpatch-D24140$ extractrc src/project/projectbase.kcfg // i18n: file: src/project/projectbase.kcfg:18 // i18n: ectx: label, entry (LangCode), group (General) i18n("Language"); // i18n: file: src/project/projectbase.kcfg:32 // i18n: ectx: label, entry (UserLangTeam), group (General) i18n("User Language Team in Lokalize settings"); // i18n: file: src/project/projectbase.kcfg:38 // i18n: ectx: label, entry (OverrideLangTeam), group (General) i18n("Override Lokalize Language Team"); // i18n: file: src/project/projectbase.kcfg:44 // i18n: ectx: label, entry (ProjLangTeam), group (General) i18n("Project Language Team"); // i18n: file: src/project/projectbase.kcfg:59 // i18n: ectx: label, entry (PoBaseDir), group (General) i18n("The base directory for PO files (translations)"); // i18n: file: src/project/projectbase.kcfg:65 // i18n: ectx: label, entry (PotBaseDir), group (General) i18n("The base directory for POT files (templates to be translated)"); // i18n: file: src/project/projectbase.kcfg:73 // i18n: ectx: label, entry (GlossaryTbx), group (General) i18n("Project's glossary"); // i18n: file: src/project/projectbase.kcfg:11 i18n("default") QLocale::system().name() getMailingList()