We're hoping to kill of rhpl for Fedora 12. The attached (untested -- my box at the office that has bandwidth and disk space is acting up and I'm not in the office still for ~ a week) patch switches revisor to use python's gettext module directly instead of rhpl.translate. It's a pretty mechanical change. revisor will still depend on rhpl for keyboard stuff after this, but clumens and I are going to sit down and figure out the best way to kill that off after the holiday as there are about 4 or 5 packages in that position
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