Bug 509424
Summary: | Switch to using python's gettext module | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeremy Katz <katzj> | ||||
Component: | revisor | Assignee: | Jeroen van Meeuwen <vanmeeuwen+fedora> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | rawhide | CC: | jonathansteffan, vanmeeuwen+fedora | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-09-07 22:30:43 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 508951 | ||||||
Attachments: |
|
Description
Jeremy Katz
2009-07-02 17:48:56 UTC
Created attachment 350318 [details]
switch to gettext directly
revisor/modgui/package_selection.py:from rhpl.translate import getDefaultLangs revisor/modgui/lm_basic.py:from rhpl import keyboard_models revisor/modgui/lm_basic.py:import rhpl.keyboard as keyboard This is all that is left. Please let us know what the solution for removing this is. For the keyboard stuff, system-config-keyboard >= 1.3.0 has the same files if you do import system_config_keyboard.keyboard as keyboard import system_config_keyboard.keyboard_models as keyboard_models If you want to keep compat between releases, you can wrap that in a try/except ImportError piece and fall back to importing rhpl For getDefaultLangs(), you can either require anaconda and use anaconda's implementation of the comps sorting or you also need to pull in your own version of the method (below from anaconda) def _getDefaultLangs(): languages = [] for envar in ('LANGUAGE', 'LC_ALL', 'LC_MESSAGES', 'LANG'): val = os.environ.get(envar) if val: languages = val.split(':') break if 'C' not in languages: languages.append('C') # now normalize and expand the languages nelangs = [] for lang in languages: for nelang in gettext._expand_lang(lang): if nelang not in nelangs: nelangs.append(nelang) return nelangs Finalized in a4e103b943bd19dda2627114644a2e4a5f225554 |