Changeset 25114 in vbox for trunk/src/VBox
- Timestamp:
- Nov 30, 2009 4:25:33 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55484
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r24672 r25114 635 635 VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/ 636 636 VirtualBox.lproj_MODE = 755 637 VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES _ALL))637 VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES)) 638 638 639 639 # … … 742 742 # languages and should never be actually translated or installed. 743 743 # 744 updatenls:: \ 744 updatenls:: makeallnls nls/VirtualBox_en.ts 745 746 makeallnls:: \ 745 747 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES)) \ 746 748 $(wildcard include/*.h) … … 749 751 $^ \ 750 752 -ts \ 751 $(filter-out nls/ qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \753 $(filter-out nls/VirtualBox_en.ts,$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))) \ 752 754 nls/VirtualBox_xx_YY.ts 753 755 756 # Create the English translation file. This is something special cause it will 757 # contain the plural forms only. 758 nls/VirtualBox_en.ts: \ 759 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES)) \ 760 $(wildcard include/*.h) 761 $(call MSG_L1,lupdate $@) 762 $(QUIET)$(TOOL_QT4_LUPDATE) \ 763 $^ \ 764 -ts \ 765 $@ 766 $(QUIET)$(SED) -n -i -e \ 767 '/<context>/,/<\/context>/!p;/<context>/h;/<name>/H;/<message numerus="yes">/,/<\/message>/H;/<\/context>/{H;x;/<message/p}' \ 768 $@ 769 -
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r24724 r25114 62 62 63 63 TRANSLATIONS = \ 64 nls/VirtualBox_en.ts \ 64 65 nls/VirtualBox_el.ts \ 65 66 nls/VirtualBox_tr.ts \ -
trunk/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
r24726 r25114 20 20 # 21 21 22 # The list of approved GUI languages without 'en' (English).22 # The list of approved GUI languages. 23 23 VBOX_APPROVED_GUI_LANGUAGES := \ 24 en \ 24 25 de \ 25 26 zh_TW \ … … 51 52 da 52 53 53 # The list of approved GUI languages including the default 'en'.54 VBOX_APPROVED_GUI_LANGUAGES_ALL := en $(VBOX_APPROVED_GUI_LANGUAGES)55 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSettingsLanguage.cpp
r24054 r25114 241 241 continue; 242 242 243 /* Skip any English version, cause this is extra handled. */ 244 QString lang = regExp.cap (2); 245 if (lang.toLower() == "en") 246 continue; 247 243 248 bool loadOk = translator.load (fileName, nlsPath); 244 249 if (!loadOk) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r25020 r25114 2942 2942 QString selectedLangId = gVBoxBuiltInLangName; 2943 2943 2944 /* If C is selected we change it temporary to en. This makes sure any extra 2945 * "en" translation file will be loaded. This is necessary for loading the 2946 * plural forms of some of our translations. */ 2947 bool fResetToC = false; 2948 if (langId == "C") 2949 { 2950 langId = "en"; 2951 fResetToC = true; 2952 } 2953 2944 2954 char szNlsPath[RTPATH_MAX]; 2945 2955 int rc; … … 2978 2988 * case, if no explicit language file exists, we will simply 2979 2989 * fall-back to English (built-in). */ 2980 if (!aLangId.isNull() )2990 if (!aLangId.isNull() && langId != "en") 2981 2991 vboxProblem().cannotFindLanguage (langId, nlsPath); 2982 2992 /* selectedLangId remains built-in here */ … … 3049 3059 if (qtTr && (loadOk = qtTr->load (languageFileName))) 3050 3060 qApp->installTranslator (qtTr); 3051 /* The below message doesn't fit 100% (because it's an addit onal3061 /* The below message doesn't fit 100% (because it's an additional 3052 3062 * language and the main one won't be reset to built-in on failure) 3053 3063 * but the load failure is so rare here that it's not worth a separate … … 3056 3066 vboxProblem().cannotLoadLanguage (languageFileName); 3057 3067 } 3068 if (fResetToC) 3069 sLoadedLangId = "C"; 3058 3070 } 3059 3071
Note:
See TracChangeset
for help on using the changeset viewer.