#9099 closed enhancement (fixed)
Strange style code in Launchpad
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 13.11 |
Component: | Core | Version: | |
Keywords: | color style launchpad | Cc: |
Description
Do not really have a clue but the bunch of style code within the translation looks strange.
Have a look
Attachments (0)
Change History (7)
comment:1 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
It seems that gettext is ignoring empty lines while concatenating comments.
Something like
-
i18n/convstyle.pl
23 23 { 24 24 print "/* color $1 */ tr(\"$1\");\n"; 25 25 } 26 elsif($line =~ /^$/) 27 { 28 print ";\n"; 29 } 26 30 else 27 31 { 28 32 print "/* $line */\n";
will shorten it to
item "Highways/Streets/Roundabout" combo "Type" display value item "Ways/Cycle Lane" combo "Highway" display value item "Man Made/Man Made/Entrance" combo "Entrance" display value <rule> <condition k="highway" v="service"/> color service <rule> <condition k="public_transport" v="platform"/> <condition k="train" v="yes"/> <icon annotate="true" src="transport/railway_station.png" priority="10" /> color service <rule> <condition k="public_transport" v="platform"/> <condition k="tram" v="yes"/> <icon annotate="true" src="transport/railway_station.png" priority="8" /> color service <rule> <condition k="public_transport" v="platform"/> <condition k="ferry" v="yes"/> <icon annotate="true" src="transport/ferry.png" priority="7" /> color service <rule> <condition k="public_transport" v="platform"/> <condition k="aerial" v="yes"/> <icon annotate="true" src="transport/aerialway/station.png" priority="6" /> color service <rule> <condition k="public_transport" v="platform"/> <condition k="bus" v="yes"/> <icon annotate="true" src="transport/bus_small.png" priority="4" /> color service <rule> <condition k="public_transport" v="platform"/> <icon annotate="true" src="transport/bus_small.png" priority="-10"/> color service
Another hack like
-
i18n/convstyle.pl
21 21 } 22 22 elsif($line =~ /colour="([^"]+)#/) 23 23 { 24 print " /* color $1 */ tr(\"$1\");\n";24 print "tr(\"\");/* color $1 */ tr(\"$1\");\n"; 25 25 } 26 26 else 27 27 {
will shorten it even more to
item "Highways/Streets/Roundabout" combo "Type" display value item "Ways/Cycle Lane" combo "Highway" display value item "Man Made/Man Made/Entrance" combo "Entrance" display value color service
(by moving all the stuff into empty string)
comment:3 by , 12 years ago
You're right. In [o29943] I moved must ugly comments to empty string, which should not appear in list of translations.
comment:4 by , 12 years ago
Keywords: | color style launchpad added |
---|---|
Resolution: | wontfix |
Status: | closed → reopened |
Type: | defect → enhancement |
Well, some better filtering/shortening would be nice and less confusing for translators.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:6 by , 12 years ago
Milestone: | → 13.11 (6383) |
---|
A side effect of how gettext extracts comments. I don't know a solution to this.