Not all units in the Object Transform dialog are translatable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Inkscape |
Low
|
Fernando Lucchesi |
Bug Description
The units for the angle in the Object > Transform dialog are not translatable. The "deg" unit in the tabs Rotate and Skew is different in at least a couple of languages, but simultaneously "rad" should also be made translatable.
I tried working on this, but failed in fixing the issue.
Related branches
Changed in inkscape: | |
importance: | Undecided → Low |
milestone: | none → 0.49 |
tags: | added: translation |
It took me a while to notice that the units are located on share/units.
Actually it did break Rotate(which was odd, since Skew still worked), so I replaced all occurrences of "deg" on the codebase, which seems to have fixed it.
So, here's the patch.
Johan Engelen (johanengelen) wrote : | #3 |
I am not sure whether the change in units.txt is good. The abbreviated unit name is used in the code to obtain a value from a spinbox or preference in the correct unit. For example:
double deg_angle = _spin_angle.
(_spin_angle is the spinbox for the angle in the guideline dialog).
It would be quite annoying for programmers if this no longer works, and one would have to look up how to write the °.
Are other units translatable?
Johan Engelen (johanengelen) wrote : | #4 |
Making the units translatable in these dropdown boxes will be some work. It will involve /src/ui/
For exampe, have a look at how this is done for the language preference, see
"UI::Widget:
UnitMenu should be changed accordingly.
Perhaps there could be a constant DEG with value "°"(on utils/units.h or maybe somewhere else). That would solve the problem for programmers:
double deg_angle = _spin_angle.
If that's not a good solution I'll work on the translatable version.
Johan Engelen (johanengelen) wrote : Re: [Bug 666370] Re: Not all units in the Object Transform dialog are translatable | #6 |
On 17-4-2011 23:52, Fernando Lucchesi Bastos Jurema wrote:
> Perhaps there could be a constant DEG with value "°"(on utils/units.h or maybe somewhere else). That would solve the problem for programmers:
> double deg_angle = _spin_angle.
>
> If that's not a good solution I'll work on the translatable version.
Maybe I am whining too much; the programmer issue is a bit dumb, sorry
for bringing that up. (a #define DEG "º" maybe nice though yeah, add it
in units.h)
But I am also worried a bit that I wouldn't have recognized the symbol
in Inkscape...
Otoh, maybe I'll try and get the unit to display inside the widget (like
the zoom entry box, bottomright), and then it would look much nicer to
have the °.
Note: ASCII defines two ° thingies: 248 ° and 167 º. Which one do you
want to take?
jazzynico (jazzynico) wrote : | #7 |
According to <http://
I double checked, and I had used the 248 symbol (there was a short description on gnome character map, so I didn't pick the wrong one).
I've included the constant on units.h
You gotta be careful because I think "deg" is a CSS3 unit prefix. You should not change the CSS parsing routines.
I'm sorry, I didn't realize that. I've reverted the changes to cssreader.cpp.
Changed in inkscape: | |
assignee: | nobody → Fernando Lucchesi (fernandolbastos) |
status: | Confirmed → In Progress |
jazzynico (jazzynico) wrote : | #12 |
Tested on Windows XP, Inkscape revision 11098.
Looks good, no obvious regression.
Thanks Fernando!
jazzynico (jazzynico) wrote : | #13 |
Patch committed, revision 11116.
Changed in inkscape: | |
status: | In Progress → Fix Committed |
Clayton Walker (clayton.walker) wrote : | #14 |
Personally, I think the deg symbol "°" just looks weird. Like there was some sort of odd internationaliz
I vote for a change back to Degrees/Radians.
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
Instead of translating it, deg could be replaced with ° (which is the unit symbol for degrees that us accepted by the International System of Units). rad for radians is correct.