Unable to set Serbian as Language

Bug #1823778 reported by momcilo78
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Fix Released
High
Gunnar Hjalmarsson
Bionic
Fix Released
High
Gunnar Hjalmarsson
Disco
Fix Released
High
Gunnar Hjalmarsson

Bug Description

[Impact]

The Serbian language items, both the Cyrillic and the Latin, are not shown as selectable items in the Language widget in Region & Language. Furthermore, once that has been fixed, selecting the Serbian-Latin option results in the Serbian-Cyrillic language to be set.

The proposed upload (via merge proposal) fixes both the issues.

[Workaround]

To set a Serbian language option (or Catalan - Valencia, which is also affected by this) you can go to Settings -> Region & Language, click the "Manage Installed Languages" button, and set it through that GUI.

[Test Case]

* Install gnome-control-center from {bionic,disco}-proposed.

* Install the Serbian language via gnome-language-selector.

* Open Settings -> Region & Language and open the Language widget.

* You should see both "Serbian (Serbia)" and "Serbian (Serbia) - latin"
  in the list. Confirm that you can successfully switch to both the
  options.

[Regression Potential]

An explanation how the proposed fixes address the issues would be a bit technical, but basically we simply drop Ubuntu specific changes which have proved to have adverse side effects. The regression risk ought to be low.

[Original description]

Affected: 18.04.2 (did not try earlier versions of 18.04 series)
Not affected: 16.04 - any version (UI was different)

Preparation steps:
1. open gnome control center
2. open Region & Language
3. open Manage installed languages
4. open Install/Remove languages
5. select Serbian, click Apply
6. provide credentials for sudo installation
7. wait for installation to complete
8. click Close

What is wrong:
1. open gnome control center
2. open Region & Language
3. click Language selection
4. Serbian is not visible

Notes:
- Serbian is visible for the Formats selection
- Any other language I thought of: (Macedonian, Croatian, Bosnian, Russion...) simple work.

Here is some dpkg output on installaed packages matching sr (Serbian) or hr (Croatian).

ii firefox-locale-sr 66.0.2+build1-0ubuntu0.18.04.1 amd64 Serbian language pack for Firefox
ii gnome-getting-started-docs-sr 3.28.2-0ubuntu0.1 all Help a new user get started in GNOME (Serbian)
ii gnome-user-docs-sr 3.28.2+git20180715-0ubuntu0.1 all GNOME user's guide (Serbian)
ii hunspell-sr 1:6.0.3-3 all Serbian dictionary for hunspell
ii hyphen-sr 1:6.0.3-3 all Serbian hyphenation patterns
ii language-pack-gnome-sr 1:18.04+20180712 all GNOME translation updates for language Serbian
ii language-pack-gnome-sr-base 1:18.04+20180712 all GNOME translations for language Serbian
ii language-pack-sr 1:18.04+20180712 all translation updates for language Serbian
ii language-pack-sr-base 1:18.04+20180712 all translations for language Serbian
ii libreoffice-l10n-sr 1:6.0.7-0ubuntu0.18.04.2 all office productivity suite -- Serbian language package
ii thunderbird-locale-sr 1:60.6.1+build2-0ubuntu0.18.04.1 amd64 Serbian language pack for Thunderbird
nebojsa@momcilo-desktop:~$ dpkg -l | grep -e "-hr"
rc language-pack-gnome-hr-base 1:18.04+20180712 all GNOME translations for language Croatian
rc language-pack-hr-base 1:18.04+20180712 all translations for language Croatian

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-control-center 1:3.28.2-0ubuntu0.18.04.2
ProcVersionSignature: Ubuntu 4.18.0-17.18~18.04.1-generic 4.18.20
Uname: Linux 4.18.0-17-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Apr 8 20:10:54 2019
InstallationDate: Installed on 2019-04-06 (2 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: gnome-control-center
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
momcilo78 (momcilo78) wrote :
Revision history for this message
momcilo78 (momcilo78) wrote :

Little correction: the correct language packages for Croatian as a reference are here:

nebojsa@momcilo-desktop:~$ dpkg -l | grep -e "-hr"
ii firefox-locale-hr 66.0.2+build1-0ubuntu0.18.04.1 amd64 Croatian language pack for Firefox
ii gnome-getting-started-docs-hr 3.28.2-0ubuntu0.1 all Help a new user get started in GNOME (Croatian)
ii gnome-user-docs-hr 3.28.2+git20180715-0ubuntu0.1 all GNOME user's guide (Croatian)
ii hunspell-hr 1:6.0.3-3 all Croatian dictionary for hunspell
ii hyphen-hr 1:6.0.3-3 all Croatian hyphenation patterns
ii language-pack-gnome-hr 1:18.04+20180712 all GNOME translation updates for language Croatian
ii language-pack-gnome-hr-base 1:18.04+20180712 all GNOME translations for language Croatian
ii language-pack-hr 1:18.04+20180712 all translation updates for language Croatian
ii language-pack-hr-base 1:18.04+20180712 all translations for language Croatian
ii libreoffice-l10n-hr 1:6.0.7-0ubuntu0.18.04.2 all office productivity suite -- Croatian language package
ii thunderbird-locale-hr 1:60.6.1+build2-0ubuntu0.18.04.1 amd64 Croatian language pack for Thunderbird

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
momcilo (momcilo-majic) wrote :

I recovered my long-lost launchpad account, please change reporter the account posting this message.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I can reproduce the problem. I also tried to install Catalan, which ought to result in two additional language options: Catalan and Catalan-Valencia. However, only Catalan shows up in the list of selectable languages in gnome-control-center.

This makes me suspect that the problem is somehow related to the use of locale names with modifiers.

$ locale -a | grep -E '^sr_RS|^ca_ES'
ca_ES.utf8
ca_ES.utf8@valencia
sr_RS
sr_RS@latin
sr_RS.utf8
sr_RS.utf8@latin

gnome-control-center may not handle such locale names properly.

As a workaround you can select Serbian using Language Support, i.e. the UI which shows up when you click the "Manage Installed Languages" button.

(I don't think anyone can change the bug reporter easily. I subscribed your other name too to this bug report; that's sufficient for now, right?)

Changed in gnome-control-center (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Related upstream issue:

https://gitlab.gnome.org/GNOME/gnome-desktop/issues/50

However, we have Ubuntu specific patches which affect locale modifiers, so this may well be an issue on the Ubuntu side.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I checked panels/common/cc-common-language.c and found that all the installed languages (including the two Serbian ones) are passed to the insert_language() function, whose label_own_lang variable is assigned the corresponding label. Hence the GHashTable returned by cc_common_language_get_initial_languages() ought to include it all.

Changed in gnome-control-center (Ubuntu):
importance: Medium → High
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Accidentally I found one reason why the Serbian language is hidden in the gnome-control-center GUI. In the add_all_languages() function in panels/common/cc-language-chooser.c the upstream code includes a call for gnome_get_all_locales(). That call is replaced by a call for gnome_get_all_languages() via ubuntu-region-langpack-install.patch. So I have submitted a MP where I propose that we simply disable ubuntu-region-langpack-install.patch for now (that feature for installing languages doesn't work anyway).

I think that the underlying reason why disabling that patch makes a difference is that the Serbian locale names according to /usr/share/i18n/SUPPORTED do not include the ".UTF-8" part. However, the alias "sr_RS.UTF-8" should really be considered valid.

With that patch disabled, two Serbian options show up in gnome-control-center. The bad news is that both refer to Serbian (Serbia), i.e. the sr_RS.UTF-8 locale, so you still can't choose the latin option (the sr_RS.UTF-8@latin locale) from gnome-control-center. (You can choose it from Language Support.)

Further investigation needed. The remaining problem is most likely related to the fact that Serbian-Latin (just as Catalan-Valencia) is represented by a locale with a locale modifier.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I uploaded a modified bionic package to a PPA:

https://launchpad.net/~gunnarhj/+archive/ubuntu/gnome-control-center

@momcilo: Please feel free to test.

Revision history for this message
momcilo78 (momcilo78) wrote :

@gunnarhj: works!
That was quick.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@momcilo: Great! It's not in the bionic archive yet, though. That will probably take a few weeks, since I'd like to also fix the problem with setting Serbian-Latin as language.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.32.1-1ubuntu4

---------------
gnome-control-center (1:3.32.1-1ubuntu4) disco; urgency=medium

  * debian/patches/git_nightlight_translations.patch:
    - define some strings in the night light dialog as translatable

  [ Gunnar Hjalmarsson ]
  * debian/patches/series:
    - Disable ubuntu-region-langpack-install.patch (partially fixes
      LP: #1823778).

  [ Iain Lane ]
  * Fix mismerged ubuntu-language-support patch. The UI was put in the wrong
    place in the .ui file, where it didn't show up.
  * debian/patches/info-use-UDisks-to-retrieve-disk-size.patch: Drop.
    This is upstream and no longer in the patch series.

 -- Sebastien Bacher <email address hidden> Fri, 12 Apr 2019 16:20:42 +0200

Changed in gnome-control-center (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I think I have fixed the rest, including the modifier issue affecting e.g. Serbian-Latin and Catalan-Valencia.

* Re-opened the bug; new merge proposal for disco (if not too late)

* Added a bug task for bionic; separate merge proposal for that

And @momcilo: The PPA has been updated, so you can test the latest proposal if you like.

description: updated
Changed in gnome-control-center (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: Fix Released → In Progress
Changed in gnome-control-center (Ubuntu Bionic):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Iain Lane (laney) wrote :

Thanks for this Gunnar. I'll upload. I do think that Matthias's comments upstream make sense though - presenting the modifiers directly does not look particularly great. It'd be good if we could address this somehow.

Iain Lane (laney)
Changed in gnome-control-center (Ubuntu Disco):
status: New → In Progress
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
Revision history for this message
Iain Lane (laney) wrote :

Uploaded for eoan and disco. bionic doesn't cherry-pick cleanly - Gunnar, can you prepare a branch please?

Revision history for this message
Iain Lane (laney) wrote :

wait, you did, nm

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.32.1-1ubuntu5

---------------
gnome-control-center (1:3.32.1-1ubuntu5) eoan; urgency=medium

  * debian/patches/52_region_language.patch:
    Fix languages whose locale includes a modifier (LP: #1823778):
    - Make language labels include modifiers when present
    - Don't drop possible modifier when setting language

 -- Gunnar Hjalmarsson <email address hidden> Mon, 29 Apr 2019 13:23:29 +0100

Changed in gnome-control-center (Ubuntu):
status: In Progress → Fix Released
description: updated
Mathew Hodson (mhodson)
Changed in gnome-control-center (Ubuntu Disco):
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello momcilo78, or anyone else affected,

Accepted gnome-control-center into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-control-center/1:3.32.1-1ubuntu4.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-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-control-center (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-disco
Revision history for this message
Brian Murray (brian-murray) wrote :

Is there a reason this has not been targetted to and uploaded to the cosmic queue?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2019-05-08 23:09, Brian Murray wrote:
> Is there a reason this has not been targetted to and uploaded to the
> cosmic queue?

Talking for me:

Two months left; it's a settings glitch in the UI which can be worked around, and possible users who wanted to set one of the missing languages can be assumed to have either found a way or given up.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I installed gnome-control-center 1:3.32.1-1ubuntu4.1 from disco-proposed and verified the test case.

tags: added: verification-done-disco
removed: verification-needed-disco
Revision history for this message
Brian Murray (brian-murray) wrote :

Could you add the workaround to the bug description just in case anyone on Cosmic stumbles upon this?

Changed in gnome-control-center (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello momcilo78, or anyone else affected,

Accepted gnome-control-center into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-control-center/1:3.28.2-0ubuntu0.18.04.4 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2019-05-09 01:08, Brian Murray wrote:
> Could you add the workaround to the bug description just in case
> anyone on Cosmic stumbles upon this?

Done.

I installed gnome-control-center 1:3.28.2-0ubuntu0.18.04.4 from bionic-proposed and verified the test case.

description: updated
tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.32.1-1ubuntu4.1

---------------
gnome-control-center (1:3.32.1-1ubuntu4.1) disco; urgency=medium

  * debian/patches/52_region_language.patch:
    Fix languages whose locale includes a modifier (LP: #1823778):
    - Make language labels include modifiers when present
    - Don't drop possible modifier when setting language

 -- Gunnar Hjalmarsson <email address hidden> Mon, 29 Apr 2019 14:35:40 +0100

Changed in gnome-control-center (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-control-center 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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.28.2-0ubuntu0.18.04.4

---------------
gnome-control-center (1:3.28.2-0ubuntu0.18.04.4) bionic; urgency=medium

  * debian/patches/ubuntu-region-langpack-install.patch:
    - Dropped, which makes Serbian language items show up as selectable
      in Region & Language (LP: #1823778).
  * debian/patches/52_region_language.patch:
    - Prevent that the modifier part is dropped when a language
      represented by a locale with modifier is set (LP: #1823778).

 -- Gunnar Hjalmarsson <email address hidden> Sat, 13 Apr 2019 03:05:00 +0200

Changed in gnome-control-center (Ubuntu Bionic):
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.