Skip to content

Commit

Permalink
Generic detection for FF and Thunderbird l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Lefebvre committed Aug 20, 2010
1 parent c2dd32d commit 9c1aa1b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
@@ -1,3 +1,9 @@
live-installer (2010.08.20.2) debian; urgency=medium

* Generic detection for l10n (FF and thunderbird)

-- Clement Lefebvre <root@linuxmint.com> Sat, 20 Aug 2010 18:04:00 +0000

live-installer (2010.08.20.1) debian; urgency=medium

* locale and keyboard layout fixes
Expand Down
28 changes: 23 additions & 5 deletions usr/lib/live-installer/installer.py
Expand Up @@ -345,12 +345,30 @@ def install(self):
# localize Firefox and Thunderbird
self.update_progress(total=our_total, current=our_current, message=_("Localizing Firefox and Thunderbird"))
if self.locale != "en_US":
import commands
os.system("apt-get update")
self.run_in_chroot("apt-get update")
if "_" in self.locale:
language_code = self.locale.split("_")[0]
if language_code in ["fr"]:
self.run_in_chroot("apt-get install --yes --force-yes firefox-l10n-" + language_code)
self.run_in_chroot("apt-get install --yes --force-yes thunderbird-l10n-" + language_code)
locale = self.locale.replace("_", "-")

num_res = commands.getoutput("aptitude search firefox-l10n-%s | grep firefox-l10n-%s | wc -l" % (locale, locale))
if num_res != "0":
self.run_in_chroot("apt-get install --yes --force-yes firefox-l10n-" + locale)
else:
if "_" in self.locale:
language_code = self.locale.split("_")[0]
num_res = commands.getoutput("aptitude search firefox-l10n-%s | grep firefox-l10n-%s | wc -l" % (language_code, language_code))
if num_res != "0":
self.run_in_chroot("apt-get install --yes --force-yes firefox-l10n-" + language_code)

num_res = commands.getoutput("aptitude search thunderbird-l10n-%s | grep thunderbird-l10n-%s | wc -l" % (locale, locale))
if num_res != "0":
self.run_in_chroot("apt-get install --yes --force-yes thunderbird-l10n-" + locale)
else:
if "_" in self.locale:
language_code = self.locale.split("_")[0]
num_res = commands.getoutput("aptitude search thunderbird-l10n-%s | grep thunderbird-l10n-%s | wc -l" % (language_code, language_code))
if num_res != "0":
self.run_in_chroot("apt-get install --yes --force-yes thunderbird-l10n-" + language_code)

# set the keyboard options..
our_current += 1
Expand Down

0 comments on commit 9c1aa1b

Please sign in to comment.