French language locale missing : Gnome-Weather

Bug #1704533 reported by NoOne on 2017-07-15
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GNOME Weather
Unknown
Medium
Ubuntu Translations
High
Gunnar Hjalmarsson
gnome-weather (Ubuntu)
High
Unassigned
libgweather (Ubuntu)
High
Unassigned
Xenial
High
Unassigned
Zesty
High
Unassigned
Artful
High
Unassigned

Bug Description

[Impact]

The variable GETTEXT_PACKAGE is set to "libgweather-3.0" when building libgweather, which makes the libgweather-common binary look for translations in files named "libgweather-3.0.mo". The template name in Rosetta (LP) is "libgweather", so the files provided by the language packs are named "libgweather.mo". This mismatch results in the messages describing the weather type always be displayed in English.

The uploaded package works around the issue by setting GETTEXT_PACKAGE to "libgweather".

In bionic the template name in Rosetta has been changed to "libgweather-3.0", and thus the workaround will be reversed.

[Test Case]

 * Install French language support

 * Start gnome-weather with:
   LANGUAGE=fr gnome-weather
   and find that the description of the weather type is displayed in
   English.

 * Install these packages from -proposed:
   - gir1.2-gweather-3.0
   - libgweather-3-6
   - libgweather-common

 * Start gnome-weather with:
   LANGUAGE=fr gnome-weather
   and find that the description of the weather type is now displayed
   in French.

[Regression Potential]

None.

[Original description]

In Gnome Weather, part of it is not translated in french : cloudy, rain showers, etc. Should be : nuageux, pluie fine, etc.

I guess it's a missing french localization. Fedora does not have that problem. In Gnome-Software, they have a section for languages, under the extensions section.

NoOne (1noname) wrote :
Jeremy Bicha (jbicha) on 2017-07-15
affects: ubuntu-gnome → gnome-weather
affects: gnome-weather → gnome-weather (Ubuntu)
Gunnar Hjalmarsson (gunnarhj) wrote :

@Jeremy: AFAICT the strings mentioned in the bug description don't exist in the gnome-weather package. Any idea where they come from?

Jeremy Bicha (jbicha) wrote :

Gunnar, could you check if libgweather provides those strings?

Gunnar Hjalmarsson (gunnarhj) wrote :

In libgweather I find "Rain showers" but not "Cloudy". "Rain showers" is translated:

$ lsb_release -ds
Ubuntu 16.04.2 LTS
$ echo $(LANGUAGE=fr gettext --domain=libgweather 'Rain showers')
Averses

So this seems not to be it.

mrprobot (mrprobot) wrote :

I can confirm this on a german install.

Sebastien Bacher (seb128) wrote :

Thnaks for the bug report

Changed in gnome-weather (Ubuntu):
status: New → In Progress
importance: Undecided → High
Jeremy Bicha (jbicha) wrote :

I believe these strings are in libgweather and not gnome-weather.

libgweather actually provides two potfiles, these strings should be in the libgweather potfile instead of the locations one.

https://git.gnome.org/browse/libgweather/tree/libgweather/gweather-weather.c
https://git.gnome.org/browse/libgweather/tree/po/POTFILES.in
https://translations.launchpad.net/ubuntu/artful/+source/libgweather/+pots/libgweather

From the publishing history, libgweather has been in main continuously for years.

Changed in libgweather (Ubuntu):
importance: Undecided → High
status: New → Confirmed
NoOne (1noname) wrote :

Is there some way to fix it or a workaround ?

Something I could try to help ?

Christophe C (batra3) wrote :

2017-08-18 - Ubuntu Gnome 17.04 - meteo mix franche and english. Exemple : "Broken clouds, puis Drizzle, suivi par Overcast plus tard. Température ressentie : 22,0°C"

Changed in gnome-weather:
importance: Unknown → Medium
status: Unknown → Confirmed
Christophe C (batra3) wrote :

In fact the problem is simple : libgweather-common.deb had not package the traductions (!!).

In debian sid, libgweather-common.deb (3.26.0-1) include (a part of) the trad files in /usr/share/locale. For example :
/usr/share/locale/et/LC_MESSAGES/libgweather-3.0.mo
/usr/share/locale/et/LC_MESSAGES/libgweather-locations.mo
/usr/share/locale/eu/LC_MESSAGES/libgweather-3.0.mo
/usr/share/locale/eu/LC_MESSAGES/libgweather-locations.mo
/usr/share/locale/fr/LC_MESSAGES/libgweather-3.0.mo
/usr/share/locale/fr/LC_MESSAGES/libgweather-locations.mo
.......

See here the complet list of "normals" files : https://packages.debian.org/sid/all/libgweather-common/filelist.

In Ubuntu 17.10 and 18.04, libgweather-common.deb has NOT these files. /usr/share/locale is not include.

I picked the 2 files which interess me in libgweather-common.deb from sid :
/usr/share/locale/fr/LC_MESSAGES/libgweather-3.0.mo
/usr/share/locale/fr/LC_MESSAGES/libgweather-locations.mo
and i copied them (in root) in the same directory on my disk. And GNOME-WEATHER just Work. In french.

So please, rebuild libgweather-common.deb with /usr/share/locale/. Or directly use the sid version....

Jeremy Bicha (jbicha) wrote :

Christophe, thank for your feedback and helping to make Ubuntu better.

Ubuntu does use the same packaging for libgweather as Debian, except that Ubuntu uses language packs. There is a problem with gnome-weather not working correctly with Ubuntu language packs. This might be similar to LP: #1491787 which was just fixed upstream in GNOME.

Gunnar Hjalmarsson (gunnarhj) wrote :

It seems to be a filename confusion. libgweather-common looks for libgweather-3.0.mo while the language packs provide libgweather.mo. It works for me on 17.10 with the version in this PPA:

https://launchpad.net/~gunnarhj/+archive/ubuntu/libgweather

It might be a way to fix it on stable releases. Going forward I suppose we should make the language packs build with the right filenames.

Jeremy Bicha (jbicha) wrote :

Gunnar, I'll upload that to bionic to see if it works there too. (It might work in the PPA just because locales aren't stripped there).

Gunnar Hjalmarsson (gunnarhj) wrote :

On 2017-12-08 23:38, Jeremy Bicha wrote:
> (It might work in the PPA just because locales aren't stripped
> there).

To test that I renamed

/usr/share/locale/sv/LC_MESSAGES/libgweather.mo

to

/usr/share/locale/sv/LC_MESSAGES/libgweather.mo.bak

and it still found the Swedish translations. So it ought to work also when the translations are stripped.

Gunnar Hjalmarsson (gunnarhj) wrote :

OTOH, doing so makes the source package actually name the files libgweather.mo. Maybe a better way, to not confuse Rosetta, is to change line 87 in

https://git.gnome.org/browse/libgweather/tree/libgweather/gweather-weather.c

from

    bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);

to

    bindtextdomain ("libgweather", GNOMELOCALEDIR);

But that's untested.

Jeremy Bicha (jbicha) wrote :

Gunnar, I tried the binaries from

https://launchpad.net/ubuntu/+source/libgweather/3.26.0-1ubuntu1/+build/13833364

and I still experience the bug.

tags: added: block-proposed
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2017-12-09 01:24, Jeremy Bicha wrote:
> Gunnar, I tried the binaries from
>
> https://launchpad.net/ubuntu/+source/libgweather/3.26.0-1ubuntu1/+build/13833364
>
> and I still experience the bug.

Those binaries fix the bug for me on bionic.

Please see attached image and compare with:

$ echo $(LANGUAGE=sv gettext -d libgweather Overcast)
Heltäckande moln

P.S. I also tested the idea to modify gweather-weather.c directly, but that did not work for me.

Jeremy Bicha (jbicha) wrote :

Gunnar, thanks, I can confirm it works now. I guess my problem was that I tried to run LANGUAGE=fr gnome-weather instead of fully changing my locale.

Changed in gnome-weather (Ubuntu):
status: In Progress → Invalid
Changed in libgweather (Ubuntu):
status: Confirmed → Fix Committed
no longer affects: gnome-weather (Ubuntu Artful)
Changed in libgweather (Ubuntu Artful):
importance: Undecided → High
status: New → Triaged
Jeremy Bicha (jbicha) wrote :

Gunnar, do you want to try proposing your suggestion upstream to GNOME?

tags: added: artful bionic l10n
removed: block-proposed
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2017-12-09 05:13, Jeremy Bicha wrote:
> Gunnar, do you want to try proposing your suggestion upstream to
> GNOME?

I doubt they would acknowledge it as an upstream thing. The issue may have been present since the porting to GTK+ 3.0 in 2010:

https://git.gnome.org/browse/libgweather/commit/?h=gnome-3-0&id=c301fd22

My theory is that the template name in LP should have been changed then from "libgweather" to "libgweather-3.0", but that did not happen.

https://translations.launchpad.net/ubuntu/+source/libgweather

And that may be the reason why the langpack builder keeps creating files named "libgweather.mo".

So the change may be an SRU candidate if it's considered important enough, but my belief is that the 'right' fix in 18.04+ is to change the langpacks somehow and drop the patch. And if nobody has time to do that, keeping the "hack" as an Ubuntu/Debian delta for now is another option.

Gunnar Hjalmarsson (gunnarhj) wrote :

To be specific, I think that both the template name and translation domain should be changed to "libgweather-3.0" here:

https://translations.launchpad.net/ubuntu/bionic/+source/libgweather/+pots/libgweather/+admin

I think I have permission to do that, but want to talk with Sebastien first.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libgweather - 3.26.0-1ubuntu1

---------------
libgweather (3.26.0-1ubuntu1) bionic; urgency=medium

  * debian/patches/langpack-hack.patch:
    - Try to make libgweather-common find the translations in Ubuntu's
      language packs (LP: #1704533).

 -- Gunnar Hjalmarsson <email address hidden> Fri, 08 Dec 2017 22:54:00 +0100

Changed in libgweather (Ubuntu):
status: Fix Committed → Fix Released
Gunnar Hjalmarsson (gunnarhj) wrote :

Discussed the proposal in comment #21 with Sebastien Bacher, and changed the template name and translation domain to "libgweather-3.0" in LP for bionic.

Changed in ubuntu-translations:
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → High
status: New → In Progress
description: updated
Jeremy Bicha (jbicha) on 2017-12-11
Changed in libgweather (Ubuntu Artful):
status: Triaged → In Progress
Gunnar Hjalmarsson (gunnarhj) wrote :
tags: added: patch
description: updated
Changed in gnome-weather:
status: Confirmed → Unknown
Gunnar Hjalmarsson (gunnarhj) wrote :

For the record I'd like to mention that the key information to spot the root cause of this bug was provided in Christophe's comment #10, even if the solutions differ.

Thanks, Christophe, for your helpful contribution!

Jeremy Bicha (jbicha) on 2017-12-12
no longer affects: gnome-weather (Ubuntu Xenial)
no longer affects: gnome-weather (Ubuntu Zesty)
Changed in libgweather (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → High
Changed in libgweather (Ubuntu Zesty):
status: New → In Progress
importance: Undecided → High
Jeremy Bicha (jbicha) wrote :

Uploaded debdiffs to the SRU queue where they will need to be manually approved by the SRU Team before being built as proposed updates.

Hello NoOne, or anyone else affected,

Accepted libgweather into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libgweather/3.18.2-0ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libgweather (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Changed in libgweather (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed-zesty
Changed in libgweather (Ubuntu Artful):
status: In Progress → Fix Committed
Chris J Arges (arges) wrote :

Hello NoOne, or anyone else affected,

Accepted libgweather into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libgweather/3.24.1-0ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed-artful
Chris J Arges (arges) wrote :

Hello NoOne, or anyone else affected,

Accepted libgweather into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libgweather/3.26.0-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Gunnar Hjalmarsson (gunnarhj) wrote :

Verified the test case
- on xenial with version 3.18.2-0ubuntu0.2 from xenial-proposed
- on zesty with version 3.24.1-0ubuntu0.2 from zesty-proposed
- on artful with version 3.26.0-1ubuntu0.1 from artful-proposed

tags: added: verification-done verification-done-artful verification-done-xenial verification-done-zesty
removed: verification-needed verification-needed-artful verification-needed-xenial verification-needed-zesty
NoOne (1noname) wrote :

Sorry, I can't test it...

I enabled artful-proposed.

I created a file in /etc/apt/preferences.d/proposed-updates with this content:

Package: libgweather
Pin: release a=artful-proposed
Pin-Priority: 400

But when I test it with : sudo apt-get upgrade -s

I get lots of packages to upgrade.

I guess I'm doing something wrong... Not used to do that.

Gunnar Hjalmarsson (gunnarhj) wrote :

@NoOne: No need to mess with priority settings. Instead of running

sudo apt upgrade

run

sudo apt install gir1.2-gweather-3.0 libgweather-3-6 libgweather-common

and then disable -proposed again.

NoOne (1noname) wrote :

@Thanks Gunnar, it worked like you said.

Can confirm that the fix works !

Finally! Very happy. :-)

Gunnar Hjalmarsson (gunnarhj) wrote :

Thank *you*, NoOne, both for reporting the issue and for confirming the fix.

NoOne (1noname) wrote :

Now, if someone could ever fix that bug, I would be free of any annoyance in Ubuntu. :-)

https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1724105

Let's hope for 18.04.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libgweather - 3.26.0-1ubuntu0.1

---------------
libgweather (3.26.0-1ubuntu0.1) artful; urgency=medium

  * Add langpack-hack.patch:
    - Rename the gettext template to work around Launchpad issue. This fixes
      the untranslated weather conditions in the GNOME Weather app.
     (LP: #1704533)

 -- Gunnar Hjalmarsson <email address hidden> Mon, 11 Dec 2017 12:54:00 +0100

Changed in libgweather (Ubuntu Artful):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for libgweather has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libgweather - 3.24.1-0ubuntu0.2

---------------
libgweather (3.24.1-0ubuntu0.2) zesty; urgency=medium

  * Add langpack-hack.patch:
    - Rename the gettext template to work around Launchpad issue. This
      fixes the untranslated weather conditions in the GNOME Weather
      app. (LP: #1704533)

 -- Gunnar Hjalmarsson <email address hidden> Mon, 11 Dec 2017 20:29:00 +0100

Changed in libgweather (Ubuntu Zesty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libgweather - 3.18.2-0ubuntu0.2

---------------
libgweather (3.18.2-0ubuntu0.2) xenial; urgency=medium

  * Add langpack-hack.patch:
    - Rename the gettext template to work around Launchpad issue. This
      fixes the untranslated weather conditions in the GNOME Weather
      app. (LP: #1704533)

 -- Gunnar Hjalmarsson <email address hidden> Mon, 11 Dec 2017 20:25:00 +0100

Changed in libgweather (Ubuntu Xenial):
status: Fix Committed → Fix Released
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2017-12-11 14:58, Gunnar Hjalmarsson wrote:> Discussed the proposal in comment #21 with Sebastien Bacher, and
> changed the template name and translation domain to "libgweather-3.0"
> in LP for bionic.
With version 1:18.04+20180118 of language-pack-gnome-*-base and version 3.26.1-2 of libgweather-common this has now been fixed the correct way in bionic.

Changed in ubuntu-translations:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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