After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761776 - Language selection - some languages aren't capitalized
Language selection - some languages aren't capitalized
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: general
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
: 735536 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-02-09 14:39 UTC by Allan Day
Modified: 2016-02-15 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (42.20 KB, image/png)
2016-02-09 14:39 UTC, Allan Day
  Details
gnome-languages: Use g_auto* macros where applicable (14.08 KB, patch)
2016-02-09 17:32 UTC, Rui Matos
committed Details | Review
gnome-languages: Capitalize language and territory names (2.72 KB, patch)
2016-02-09 17:32 UTC, Rui Matos
none Details | Review
gnome-languages: Capitalize language and territory names (2.72 KB, patch)
2016-02-11 14:11 UTC, Rui Matos
committed Details | Review

Description Allan Day 2016-02-09 14:39:45 UTC
Created attachment 320718 [details]
screenshot

In the language selection screen, some languages aren't capitalized. See français in the attached screenshot, for example.
Comment 1 Rui Matos 2016-02-09 15:25:40 UTC
*** Bug 735536 has been marked as a duplicate of this bug. ***
Comment 2 Rui Matos 2016-02-09 17:31:58 UTC
I think it's better to fix in gnome-desktop so that all users immediately benefit.
Comment 3 Rui Matos 2016-02-09 17:32:50 UTC
Created attachment 320730 [details] [review]
gnome-languages: Use g_auto* macros where applicable
Comment 4 Rui Matos 2016-02-09 17:32:58 UTC
Created attachment 320731 [details] [review]
gnome-languages: Capitalize language and territory names

Translations in iso-codes are inconsistent in their capitalization of
language and territory names. That's not under our control, but we can
automatically capitalize them since that's how our API consumers
expect them to be.
Comment 5 Christian Persch 2016-02-10 17:46:07 UTC
This isn't quite correct; you need at least use g_unichar_totitle() here, not toupper. See http://unicode.org/faq/casemap_charprop.html#4 .
Comment 6 Rui Matos 2016-02-11 14:11:18 UTC
Created attachment 320883 [details] [review]
gnome-languages: Capitalize language and territory names

--

Ok, changed it to use _totitle() instead. I'm unsure if the assumption
that the character that needs changing is only the first one holds or
not. But g_unichar_totitle() works on a single character anyway so I
suppose the assumption is ok? If it isn't then shouldn't we have a
g_utf8_totitle() that does the work on a whole string and knows how
many characters to change?
Comment 7 Matthias Clasen 2016-02-11 21:08:24 UTC
Review of attachment 320883 [details] [review]:

Looks ok to me.
Comment 8 Rui Matos 2016-02-15 17:00:35 UTC
Attachment 320730 [details] pushed as 389a376 - gnome-languages: Use g_auto* macros where applicable
Attachment 320883 [details] pushed as 104fb3d - gnome-languages: Capitalize language and territory names