Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwkendrick <wkendrick>2011-06-17 23:36:10 (GMT)
committer wkendrick <wkendrick>2011-06-17 23:36:10 (GMT)
commit9bedf5a5ab2b4c8bc73f5df5058550fbffa40609 (patch)
tree9d99cf5b8f87c8dd7201bcba0d27e8c107c605bc
parentab34668cb06de0b9266c4ef8005a22f1cbfcf33f (diff)
OpenCandy expects 2-letter code, and can't have countries (e.g., "pt" is okay, "pt_br" is not). Also adding Japanese. Thanks to OC Partner Support.
-rw-r--r--win32/tuxpaint.iss24
1 files changed, 18 insertions, 6 deletions
diff --git a/win32/tuxpaint.iss b/win32/tuxpaint.iss
index 46f0c69..1d27ef2 100644
--- a/win32/tuxpaint.iss
+++ b/win32/tuxpaint.iss
@@ -316,14 +316,17 @@ begin
#endif
end;
-function Lang2Gettext(): String;
+function Lang2Gettext(TwoLetter: Boolean): String;
var
lang, lc: String;
begin
lang := ActiveLanguage();
if lang = 'bra' then
- lc := 'pt_br'
+ if TwoLetter = true then
+ lc := 'pt'
+ else
+ lc := 'pt_br'
else
if lang = 'cat' then
lc := 'ca'
@@ -365,7 +368,10 @@ begin
lc := 'sk'
else
if lang = 'chs' then
- lc := 'zh_cn'
+ if TwoLetter = true then
+ lc := 'zh'
+ else
+ lc := 'zh_cn'
else
if lang = 'esp' then
lc := 'es'
@@ -373,8 +379,14 @@ begin
if lang = 'gal' then
lc := 'gl'
else
+ if lang = 'jpn' then
+ lc := 'ja'
+ else
if lang = 'cht' then
- lc := 'zh_tw'
+ if TwoLetter = true then
+ lc := 'zh'
+ else
+ lc := 'zh_tw'
else
lc := 'en';
Result := lc
@@ -386,7 +398,7 @@ begin
CreateTheWizardPages;
end
#ifdef OpenCandy
- OCtszInstallerLanguage := Lang2Gettext();
+ OCtszInstallerLanguage := Lang2Gettext(true);
OpenCandyAsyncInit('{#OC_STR_MY_PRODUCT_NAME}', '{#OC_STR_KEY}', '{#OC_STR_SECRET}', OCtszInstallerLanguage, {#OC_INIT_MODE_NORMAL});
#endif
end;
@@ -395,7 +407,7 @@ function MyReadme(Default: String): String;
var
lang, readme: String;
begin
- lang := Lang2Gettext();
+ lang := Lang2Gettext(false);
if lang = 'nl' then
readme := 'nl\html\README.html'