Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 332751 - [PATCH]: www-client/chromium-6.0.472.33-r1: patch for linguas support in ebuild
Summary: [PATCH]: www-client/chromium-6.0.472.33-r1: patch for linguas support in ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Chromium Project
URL:
Whiteboard: ht-wanted
Keywords:
Depends on: 344025
Blocks: 336136
  Show dependency tree
 
Reported: 2010-08-14 16:00 UTC by Nikoli
Modified: 2011-05-29 15:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (chromium-6.0.472.33-r1.ebuild_linguas.diff,1.14 KB, patch)
2010-08-14 16:01 UTC, Nikoli
Details | Diff
patch (chromium-9.0.570.0.ebuild_linguas.diff,1016 bytes, patch)
2010-11-03 21:20 UTC, Nikoli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2010-08-14 16:00:27 UTC
Works fine for me, dicts list too.
Comment 1 Nikoli 2010-08-14 16:01:46 UTC
Created attachment 242955 [details, diff]
patch
Comment 2 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-08-14 18:12:15 UTC
This looks much cleaner than the earlier patch. Some comments:

- please base the patch on 6.0.490.1. I'd prefer to avoid bigger changes like this in beta channel
- I'd like one more person other than you to test it
- there should be some infrastructure to alert us when we miss a language in LANGS, or have one in LANGS that is not supported by the browser. This should be automatic, for maintainability reasons.

Ideally, much of this should be solved on the upstream side. I'd recommend you start a discussion on chromium-dev mailing list.
Comment 3 Nikoli 2010-08-14 22:47:07 UTC
>- please base the patch on 6.0.490.1. I'd prefer to avoid bigger changes like
this in beta channel

Patch works with 6.0.490.1, no need to edit now. May be we can test in dev channel and add LINGUAS support to chromium-6 when it will be in stable channel?

>- there should be some infrastructure to alert us when we miss a language in
LANGS, or have one in LANGS that is not supported by the browser. This should
be automatic, for maintainability reasons.

grep "'locales':" -A7 build/common.gypi
    'locales': [
      'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
      'en-US', 'es-419', 'es', 'et', 'fi', 'fil', 'fr', 'gu', 'he',
      'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
      'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
      'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
      'vi', 'zh-CN', 'zh-TW',
    ],
What command do you suggest?

>Ideally, much of this should be solved on the upstream side. I'd recommend you
start a discussion on chromium-dev mailing list.

I opened bug http://code.google.com/p/chromium/issues/detail?id=49371 some time ago, but it is marked 'WontFix', may be it is better place for discussion?

Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-08-14 23:19:17 UTC
(In reply to comment #3)
> Patch works with 6.0.490.1, no need to edit now.

Okay, that's fine. I was just making sure.

> May be we can test in dev channel and add LINGUAS support to chromium-6 when it will be in stable
> channel?

I'd rather avoid doing so. The stable version 6 will most probably be based on the beta, and not current dev channel release. I'd only apply it to dev for now.

> >- there should be some infrastructure to alert us when we miss a language in
> LANGS, or have one in LANGS that is not supported by the browser. This should
> be automatic, for maintainability reasons.
> 
> grep "'locales':" -A7 build/common.gypi
>     'locales': [
>       'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
>       'en-US', 'es-419', 'es', 'et', 'fi', 'fil', 'fr', 'gu', 'he',
>       'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
>       'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
>       'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
>       'vi', 'zh-CN', 'zh-TW',
>     ],
> What command do you suggest?

Maybe we can grep for each value from LANGS, and then see if the number of locales in common.gypi matches our expectations.

> I opened bug http://code.google.com/p/chromium/issues/detail?id=49371 some time
> ago, but it is marked 'WontFix', may be it is better place for discussion?

Looks like you have confused the UI language and the spell checker, or it wasn't clear for the person who closed the bug.

I was just wondering whether just removing or not installing some .paks will not make some piece of UI confused. I'd recommend asking on chromium-dev, because it's a question rather than a bug. Then you can also ask for the best way to recognize when our list of locales gets out of sync with the upstream's.
Comment 5 Mike Gilbert gentoo-dev 2010-08-19 22:39:11 UTC
What are you looking for from the herd testers on this one? Just apply the patch and see if the browser still works?

Should I be switching languages as part of testing this? Would I do that through LANG or through the Chromium preferences dialog?
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-08-19 23:07:57 UTC
(In reply to comment #5)
> What are you looking for from the herd testers on this one? Just apply the
> patch and see if the browser still works?

Oh yeah, I'd appreciate that.

> Should I be switching languages as part of testing this? Would I do that
> through LANG or through the Chromium preferences dialog?

I think that LANG is the main thing here (or maybe LC_ALL). It would be useful to see how it behaves when the requested locale is not installed. Also, see if the UI doesn't behave weirdly (that may mean the preferences dialog).

Finally, if you can help with adding the maintainability checks I asked for above, that would be great. I mean an automatic way to verify that the LANGS list contains all languages available for given release, and doesn't contain languages that are not available for given release.
Comment 7 Mike Gilbert gentoo-dev 2010-09-05 21:03:53 UTC
I adapted this for the SVN ebuild, and I get the following repoman error:

  IUSE.invalid                  2
   www-client/chromium/chromium-9999.ebuild: linguas_es_419
   www-client/chromium/chromium-9999.ebuild: linguas_fil
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-09-17 01:09:48 UTC
Nikoli, please fix the patch so that it doesn't cause repoman errors. After that feel free to reopen.
Comment 9 Nikoli 2010-09-17 01:44:48 UTC
Patch is ok , the problem is in /usr/portage/profiles/desc/linguas.desc

https://bugs.gentoo.org/show_bug.cgi?id=317665#c7

https://secure.wikimedia.org/wikipedia/en/wiki/Fil 'The ISO 639 code for the Filipino language.'
https://secure.wikimedia.org/wikipedia/en/wiki/Filipino_language
Comment 10 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-10-10 13:29:11 UTC
(In reply to comment #9)
> Patch is ok , the problem is in /usr/portage/profiles/desc/linguas.desc

Could you suggest some solution to this then?
Comment 11 Nikoli 2010-10-10 19:15:57 UTC
Add 'fil - Filipino locale' to /usr/portage/profiles/desc/linguas.desc

Only www-client/opera uses linguas_es_LA, renaming es_LA to es_419 in /usr/portage/profiles/desc/linguas.desc should be safe after fixing opera-*.ebuild
Comment 12 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-10-13 16:27:55 UTC
(In reply to comment #11)
> Only www-client/opera uses linguas_es_LA, renaming es_LA to es_419 in
> /usr/portage/profiles/desc/linguas.desc should be safe after fixing
> opera-*.ebuild

Could you file bug for www-client/opera to do that?
Comment 13 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-10-26 07:34:19 UTC
(In reply to comment #12)
> Could you file bug for www-client/opera to do that?

Feel free to re-open after filing that bug and marking it as blocking this one.
Comment 14 Nikoli 2010-11-03 20:58:06 UTC
bug 344025
Comment 15 Nikoli 2010-11-03 21:20:25 UTC
Created attachment 253073 [details, diff]
patch
Comment 16 Nikoli 2010-11-28 20:15:27 UTC
So what are you waiting for? Why not just add both es_419 and fil to linguas.desc? es_LA can be removed later, chromium users should not wait for opera devs.
Comment 17 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-11-30 15:25:09 UTC
(In reply to comment #16)
> So what are you waiting for? Why not just add both es_419 and fil to
> linguas.desc? es_LA can be removed later, chromium users should not wait for
> opera devs.

Having both es_LA and es_419 is probably even more confusing. I think we should somehow convert Gentoo's es_LA to Chromium's es_419.

My general idea is to move most of the logic to a Python script living in chromium-tools. It should be more readable and extendable than bash, and we can do all needed checks too (for example, whether our list of LINGUAS is complete and correct).

I don't have time to do that at this moment, but feel free to submit a patch for chromium-tools, see http://git.overlays.gentoo.org/gitweb/?p=proj/chromium-tools.git;a=summary
Comment 18 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-05-29 15:09:09 UTC
Done without version bump in >=www-client/chromium-13.0.772.0-r1 . Please report any remaining issues with the LINGUAS support. I hope you like it!