Internationalize the default project name in the title bar

Authored by aacid on Sep 22 2019, 11:22 AM.


Group Reviewers
Test Plan

Successfully run Lokalize after the changes, but did not actually test the change, I’m just assuming it will work

Diff Detail

R456 Lokalize
No Linters Available
No Unit Test Coverage
Build Status
Buildable 17145
Build 17163: arc lint + arc unit
adrianchavesfernandez requested review of this revision.Sep 22 2019, 11:22 AM
adrianchavesfernandez created this revision.
yurchor edited the summary of this revision. (Show Details)Sep 22 2019, 3:15 PM
yurchor added a reviewer: Localization.
pino added a subscriber: pino.Sep 22 2019, 3:29 PM

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">

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.

57 ↗(On Diff #66609)

it is already included few lines above...

pino requested changes to this revision.Sep 22 2019, 3:29 PM
This revision now requires changes to proceed.Sep 22 2019, 3:29 PM

Switched to a different approach

I don’t think extraction will work, come to think of it. The corresponding CPP file is generated on the fly. 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?

aacid accepted this revision.Sep 29 2019, 9:42 AM

$EXTRACTRC find . -name \*.ui -o -name \*.rc -o -name \*.kcfg >> rc.cpp

It's already in

$EXTRACTRC find . -name \*.ui -o -name \*.rc -o -name \*.kcfg >> rc.cpp

It's already in

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: 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

Pushed, but I’m not sure how to close this revision now.

aacid commandeered this revision.Oct 20 2019, 5:20 PM
aacid abandoned this revision.
aacid edited reviewers, added: adrianchavesfernandez; removed: aacid.