[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] master 6fe08b7 06/21: FIXED label size no
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] master 6fe08b7 06/21: FIXED label size not adjusted properly after changing option value |
Date: |
Mon, 25 Jul 2016 18:16:38 +0000 (UTC) |
branch: master
commit 6fe08b749e5d2123108b1f5b0cc424274041922e
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>
FIXED label size not adjusted properly after changing option value
FIXED display of language names containing non-ASCII characters
---
scripts/modules/option_screen.py | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/scripts/modules/option_screen.py b/scripts/modules/option_screen.py
index 1b2c885..c96e3d1 100644
--- a/scripts/modules/option_screen.py
+++ b/scripts/modules/option_screen.py
@@ -13,6 +13,10 @@
#
import adonthell
+import codecs
+
+# -- properly encode unicode strings across python versions
+def u(x): return codecs.unicode_escape_decode(x)[0]
# -- pygettext support
def _(message): return adonthell.nls_translate (message)
@@ -28,14 +32,17 @@ class option_screen (adonthell.win_container):
# Default will try to use the system language
# English is the builtin language, so uses the C locale
# Others are the actual translations that are included
+
+ # note that for the language we always try to display
+ # the native form, which requires escaping any unicode
+ # characters and also fooling xgettext by splitting the
+ # actual unicode literals in 2 halves
self.languages = [ \
("", _("Default")), \
("C", "English"), \
("da_DA", "Dansk"), \
- # ("es_ES", "Espa\xf1ol"), \
- # ("fr_FR", "Fran\xe7ais"), \
- ("es_ES", "Espanol"), \
- ("fr_FR", "Francais"), \
+ ("es_ES", u("Espa\\"+"xf1ol")), \
+ ("fr_FR", u("Fran\\"+"xe7ais")), \
("it_IT", "Italiano"), \
("nl_NL", "Nederlands")]
@@ -231,4 +238,5 @@ class option_screen (adonthell.win_container):
if label != None:
label.move (100 + (80 - label.length())//2, 0)
-
\ No newline at end of file
+ label.pack()
+
\ No newline at end of file
- [adonthell-wastesedge-commits] branch master created (now d1164d8), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master d0bc1d0 03/21: FIXED creation of adonthell-wastesedge script, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 6fe08b7 06/21: FIXED label size not adjusted properly after changing option value,
Kai Sterker <=
- [adonthell-wastesedge-commits] master a296535 02/21: ADDED script to add game data to OSX app bundle, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master e5e4325 15/21: FIXED game quitting when pressing ESC while menu labels are sliding in, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 16eedb1 17/21: ADDED bitmap to use as Window and taskbar icon, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 20eb806 04/21: FIXED launcher script inside bundle needs to determine correct path at runtime, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 2b7e807 07/21: FIXED garbage showing up in first frame of intro, due to uninitialized label, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 17ad166 05/21: FIXED replacing of bundle executable, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 8267c01 08/21: FIXED compatibility with Python 2.3, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 2120713 19/21: REMOVED Debian specific files; those are taken care of by the package maintainer, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master d1164d8 21/21: UPDATED windows package and installer scripts, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] master 88062ca 14/21: UPDATE text position during Redwyne Inn part of intro, so it is better readable, Kai Sterker, 2016/07/25