Missing translation for "Mouse" in gnome-control-center pt_BR

Bug #204705 reported by Daniel Cordeiro
76
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Undecided
Unassigned
langpack-o-matic
Fix Released
Medium
Martin Pitt
language-pack-gnome-pt (Ubuntu)
Fix Released
Undecided
Martin Pitt
Nominated for Hardy by André Gondim
Nominated for Intrepid by André Gondim
Nominated for Jaunty by André Gondim

Bug Description

Binary package hint: language-pack-gnome-pt

In Hardy Beta running Gnome with pt-BR locale system, two strings are showing incorrectly translated:

- The shortcut to "Mouse Preferences" application: it has the string correctly translated to "Preferência do Mouse" in rosetta, but in Gnome System menu (at "Sistema / Preferências") it's translated as "Preferencia do Rato". Although correct in Portuguese from Portugal, this is not how it was translated to Brazilian Portuguese. So, the correct translation that should appear in pt-br is "Preferência do Mouse".

- The shortcut to "Terminal": in pt-br the translated string in rosetta is "Terminal", but in Gnome we're getting "Consola", that is the pt translation instead. So, the correct translation that should appear in pt-br is "Terminal".

Revision history for this message
Susana Pereira (susana) wrote :

Thanks for taking the time to report this bug.

Adding Brazilian translators to CC list.

Revision history for this message
Og Maciel (ogmaciel) wrote : pt-BR should be ok

I manually updated the translation for gnome-control-center (where the mouse preferences dialog exists) and it has the correct translation from upstream. Anyhow, I've requested the po from rosetta and will update this once I have confirmed it.

Revision history for this message
Og Maciel (ogmaciel) wrote : Confirmed

I have just confirmed that the Brazilian Portuguese translation is correct, and the next version of Ubuntu (whether that is a beta or the final release) will have it.

Revision history for this message
Tayroni Alves (tay-fisica) wrote : Re: tradução de "mouse" como "rato" em pt-BR

The translation is still "Rato" either in menu preferences and in the gnome-control-center.

There's another odd translation in Aplications > Acessories > Console. This is translated "Consola" as in pt-pt.

Revision history for this message
Danilo Marques (pcdanpos) wrote :

The Hardy Heron is already out there is some days and until now no gnome-language-pack-pt-br .deb package are available. How do I must to update the translation manually since that there isn't prevision to language-pack .deb package?

Regards,

Danilo.

Revision history for this message
César (csrgamboa) wrote :

In /usr/share/applications/gnome-terminal.desktop and /usr/share/applications/gnome-settings-mouse.desktop the translations for pt and pt_BR are ok.

The problem seems to be related to gettext.

A temporary solution would be to delete the line
“X-Ubuntu-Gettext-Domain=gnome-terminal” (and “X-Ubuntu-Gettext-Domain=gnome-control-center-2.0″ for the mouse)

The strange thing is that other applications that have different translations in pt and pt_BR are ok.

Changed in language-pack-gnome-pt:
status: New → Confirmed
Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

This problem is still present in a fresh 8.10 desktop install.

Revision history for this message
Daniel Cordeiro (dcordeiro) wrote :

I can confirm this in my Intrepid updated today from Hardy.

I'm not sure if it is related to this bug or not, but the translation for "Terminal" in the Gnome Terminal menu entry is also wrong. It shows "Consola", the portuguese (from Portugal) version for the translation.

Revision history for this message
André Gondim (andregondim) wrote :

This problem is in Ubuntu, the translation is ok.

Revision history for this message
Andre Noel (andrenoel) wrote :
Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

Yes, I know the translation is ok. But does it mean this is the wrong place to report it?

Revision history for this message
Vladimir Melo (vmelo-deactivatedaccount) wrote : Re: [Bug 204705] Re: tradução de "mouse" como "rato" em pt-BR

2008/11/6 Carlos Eduardo Moreira dos Santos <email address hidden>:
> Yes, I know the translation is ok. But does it mean this is the wrong
> place to report it?
>
> --
> tradução de "mouse" como "rato" em pt-BR
> https://bugs.launchpad.net/bugs/204705
> You received this bug notification because you are a member of Ubuntu
> Brazilian Portuguese Translators, which is a direct subscriber.
>

I think so, we're not able to fix it.

--
Vladimir Melo
<email address hidden>
<email address hidden>

Revision history for this message
Daniel Cordeiro (dcordeiro) wrote : Re: tradução de "mouse" como "rato" em pt-BR

> Yes, I know the translation is ok. But does it mean this is the wrong
> place to report it?

Well, since this is not a translation problem, I added a commentary in bug #249424 (for the "Terminal" translation) and submitted a new bug #295312 (for the "Mouse" translation).

I Hope it helps.

Cheers,
Daniel

description: updated
Ursula Junque (ursinha)
description: updated
Revision history for this message
Данило Шеган (danilo) wrote : Re: wrong translation on gnome for "Terminal" and "Mouse" in pt-br

This has nothing to do with Launchpad translations, and there's nothing we can do to help with this.

Changed in rosetta:
status: New → Invalid
Revision history for this message
Ursula Junque (ursinha) wrote :

Martin, can you please take a look at it? Thanks!

Here's a brief possible explanation of the problem, given by Danilo:

<danilo> Ursinha: so, there are several possible problems there
<danilo> Ursinha: this is coming from static files (i.e. most likely a .desktop file)
<danilo> Ursinha: Ubuntu language packs don't update translations for static files, with the caveat that .desktop files are handled by a hack in Ubuntu's gettext implementation (I accidentally ran into that, I don't know much about it, but guys like Colin Watson or Martin Pitt might know about that)
<danilo> Ursinha: so, even if something is translated in Launchpad, and has been put into a language-pack by Ubuntu guys, it won't get updated in the .desktop file directly
<danilo> Ursinha: in Ubuntu, however, some .desktop files seem to use the X-Ubuntu*: header to help Ubuntu hack work
<danilo> Ursinha: that's something you should definitely check with Ubuntu packagers on how's that working
<danilo> Ursinha: for anything else, there's not much we can do except for Ubuntu packagers to rebuild Ubuntu package of the affected program with translations imported from Launchpad

Revision history for this message
Laudeci Oliveira (laudeci) wrote :

It looks like the X-Ubuntu-Gettext-Domain line is useless in .desktop files.

If your remove that line, or set it to another random value, the translation works as it should be.

Now we need to find the reason of that line, why do we have to have it in the .desktop files?
Who is responsible for that???

Maybe if we get those questions answered, we will able to have a final solution.

Revision history for this message
Martin Pitt (pitti) wrote :

The X-Ubuntu-Gettext-Domain: field is needed to assign a gettext domain to a .desktop file, so that its strings can be translated at runtime with gettext (and thus can be updated through language packs), instead of just being statically shipped in the .desktop file. Please see https://wiki.ubuntu.com/LangpacksDesktopfiles for details.

I confirmed that the current PO files seem to be correct, so this smells like a bug in the code which dynamically translates desktop files.

Changed in language-pack-gnome-pt:
assignee: nobody → pitti
status: Confirmed → In Progress
Revision history for this message
Ursula Junque (ursinha) wrote :

Hi pitti,

Is it hard to fix? It'd be very nice for Brazilian users to have it fixed in time for Jaunty release. Do you think it'd be possible?

Thanks!

Revision history for this message
Bruno Gomes (blfgomes) wrote :

I found out what is causing this bug...
It turns out that the file /usr/share/locale-langpack/pt_BR/LC_MESSAGES/gnome-terminal.mo does not have a msgid "Terminal". You can look at the contents of this file with the command below:
$ msgunfmt /usr/share/locale-langpack/pt_BR/LC_MESSAGES/gnome-terminal.mo | less

When 'gettext' tries to find the msgstr that corresponds to the msgid "Terminal" in the 'pt_BR' directory and it does not find it, it falls back to the 'pt' directory and uses that translation instead.

I discovered the issue by running 'strace' against 'gettext':
$ strace gettext gnome-terminal Terminal

I assume the "Mouse" translation bug is caused by a similar problem, but I haven't checked yet.

Revision history for this message
Martin Pitt (pitti) wrote :

I just checked this on current Jaunty (same langpacks as in intrepid), by running

  killall gnome-panel; LANG=pt_BR.UTF-8 gnome-panel

"Terminal" is correct now, but mouse preferences still say "Rato". As Bruno says, this is because pt_BR does not have a translation for it:

$ msgunfmt /usr/share/locale-langpack/pt_BR/LC_MESSAGES/gnome-control-center-2.0.mo |grep -A 1 '"Mouse"'
$

so gettext falls back from pt_BR to pt, which does have a translation:

$ msgunfmt /usr/share/locale-langpack/pt/LC_MESSAGES/gnome-control-center-2.0.mo |grep -A 1 '"Mouse"'
msgid "Mouse"
msgstr "Rato"
$

Thus the missing string needs to be added to Rosetta. If it is already, then we just need to wait on a current Jaunty (and new intrepid/hardy) langpack builds.

Changed in language-pack-gnome-pt:
assignee: pitti → nobody
status: In Progress → Triaged
Revision history for this message
Bruno Gomes (blfgomes) wrote :

Martin, you said that you checked the "Terminal" translation on Jaunty and that it has been fixed. How is that possible since the langpacks you have are allegedly the same ones in Intrepid (you said it yourself) and this bug is still present in this release?

You also said in a previous post that the .po files had the translations in it, but that doesn't seem plausible at all. If they had, the translation(s) wouldn't be missing in the .mo file(s).

Also, unless I'm mistaken, the rosetta does have the correct translations, and has had them for a long time. (https://translations.launchpad.net/ubuntu/intrepid/+source/gnome-control-center/+pots/gnome-control-center-2.0/pt_BR/+translate?batch=10&show=all&search=mouse)

Is it possible that the generated .po files aren't reflecting the actual contents of the pt_BR rosetta?

Revision history for this message
Bruno Gomes (blfgomes) wrote :

Something just occurred to me...
What is the default behavior when a translation in rosetta is the same as the original? Does it get output to the .po file at all?

If it doesn't, that would explain why "Terminal" and "Mouse" aren't getting the correct translation in pt_BR:
- They seem to be translated in rosetta, but they are the same in english as they are in brazilian portuguese. So let's assume they are not being output to the .po file.
- They are translated in pt (which supersedes pt_BR) and since they are not the same in english, they are being written in the .po files;
- When a translation in pt_BR isn't found, it falls back to pt. Therefore, instead of falling back to the english default, "Terminal" and "Mouse" are being translated to "Consola" and "Rato".

Can somebody confirm that?

Revision history for this message
Martin Pitt (pitti) wrote :

Bruno,

*slaps forehead* that's indeed it! We filter out translations where msgid == msgstr, since especially in English those just waste a ton of space. But we shouldn't do it for pt_BR, for this very reason.

I'll change langpack-o-matic to not filter them out any more, and then the next set of langpacks will fix it.

Changed in langpack-o-matic:
assignee: nobody → pitti
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in langpack-o-matic r216, and rolled out to rookery. Next langpack build will pick up the change.

Changed in langpack-o-matic:
status: In Progress → Fix Released
Changed in language-pack-gnome-pt:
status: Triaged → Fix Committed
assignee: nobody → pitti
Revision history for this message
Vitor Lamas Gatti (vitorgatti) wrote :

Thanks a lot for fixing this!!
Finally we will be getting Terminal and Mouse again... Consola and Rato is so non-Brazilian!

I'm gonna cry :P

Revision history for this message
Bruno Gomes (blfgomes) wrote :

Martin,

Thanks for the quick fix once the cause was found. One more question: are there any other languages where this behavior might have been present?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 204705] Re: Missing translation for "Mouse" in gnome-control-center pt_BR

Bruno Gomes [2009-02-12 15:55 -0000]:
> Thanks for the quick fix once the cause was found. One more question:
> are there any other languages where this behavior might have been
> present?

Not for zh_*, but it could happen for e. g. en_GB if en_GB == C and
en_US is different. But that's the case we wanted to specifically
filter out, since there are so many useless msgid == msgstr in English
:/

It could still be an issue for the various Spanish dialects. I fixed
that in langpack-o-matic now, too.

Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

Congrats Bruno and Martin!

Revision history for this message
César (csrgamboa) wrote : Re: [Bug 204705] Re: Missing translation for "Mouse" in gnome-control-center pt_BR

Thanks a lot! :)

Revision history for this message
Martin Pitt (pitti) wrote :

This should be fixed in the current Jaunty langpacks, and the ones in the PPA (https://launchpad.net/~ubuntu-langpack/+archive/ppa). Please yell/reopen if there are still problems with this.

Changed in language-pack-gnome-pt:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.