Modify

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#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 stoecker, 12 years ago

Resolution: wontfix
Status: newclosed

A side effect of how gettext extracts comments. I don't know a solution to this.

comment:2 by AlfonZ, 12 years ago

It seems that gettext is ignoring empty lines while concatenating comments.
Something like

  • i18n/convstyle.pl

     
    2323  {
    2424    print "/* color $1 */ tr(\"$1\");\n";
    2525  }
     26  elsif($line =~ /^$/)
     27  {
     28    print ";\n";
     29  }
    2630  else
    2731  {
    2832    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

     
    2121  }
    2222  elsif($line =~ /colour="([^"]+)#/)
    2323  {
    24     print "/* color $1 */ tr(\"$1\");\n";
     24    print "tr(\"\");/* color $1 */ tr(\"$1\");\n";
    2525  }
    2626  else
    2727  {

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 stoecker, 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 skyper, 12 years ago

Keywords: color style launchpad added
Resolution: wontfix
Status: closedreopened
Type: defectenhancement

Well, some better filtering/shortening would be nice and less confusing for translators.

comment:5 by stoecker, 12 years ago

Resolution: fixed
Status: reopenedclosed

comment:6 by Don-vip, 12 years ago

Milestone: 13.11 (6383)

comment:7 by stoecker, 8 years ago

Milestone: 13.11 (6383)13.11

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.