pidgin: 45c13cbd: Final piece of getting the installer tra...
datallah at pidgin.im
datallah at pidgin.im
Tue May 18 23:31:21 EDT 2010
-----------------------------------------------------------------
Revision: 45c13cbd9c56429c7ed3b9a147b1d76692f3968d
Ancestor: ac55671526c467bd565efcd2f668ae32e25ea7e7
Author: datallah at pidgin.im
Date: 2010-05-19T03:26:05
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/45c13cbd9c56429c7ed3b9a147b1d76692f3968d
Deleted entries:
pidgin/win32/nsis/langmacros.nsh
Modified files:
Makefile.am Makefile.mingw libpurple/win32/global.mak
libpurple/win32/rules.mak pidgin/Makefile.am
pidgin/win32/nsis/create_nsis_translations.pl
pidgin/win32/nsis/nsis_translations.desktop.in
pidgin/win32/nsis/pidgin-installer.nsi
ChangeLog:
Final piece of getting the installer translations integrated with the regular
po files. This is a variation of the instructions at:
http://nsis.sourceforge.net/Creating_language_files_and_integrating_with_MUI
Using a Perl tool that the gcompris folks wrote.
The NSIS LangStrings needed to have the underscores removed because .desktop
files variable names may not contain underscores.
Currently only translations with >=50% coverage will be present in the installer
-------------- next part --------------
============================================================
--- Makefile.am fd21ebbbb681186cecb92104b871eff86d2e0cbf
+++ Makefile.am 87aa43e82749a0367cfa8c585747e7776f650c18
@@ -77,7 +77,7 @@ appsdir = $(datadir)/applications
if ENABLE_GTK
appsdir = $(datadir)/applications
-apps_in_files = pidgin.desktop.in
+apps_in_files = pidgin.desktop.in pidgin/win32/nsis/nsis_installer.desktop.in
apps_DATA = $(apps_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
GTK_DIR=pidgin
============================================================
--- Makefile.mingw dbc131d27e8d3bbc06ca516c8b5a88315f0a1086
+++ Makefile.mingw a1b1a8abd58ab26d2c76e3bb5213a37e12e93238
@@ -75,6 +75,8 @@ EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o
#build an expression for `find` to use to ignore the above files
EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS))
+include $(PIDGIN_COMMON_RULES)
+
.PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_installer_includes $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT)
all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H)
@@ -101,7 +103,7 @@ pidgin/win32/nsis/gtk-runtime-$(GTK_BUND
pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip:
pidgin/win32/nsis/generate_gtk_zip.sh `pwd`
-generate_installer_includes: create_release_install_dir pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip debug_symbols_zip
+generate_installer_includes: create_release_install_dir pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip debug_symbols_zip $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/nsis_translations.desktop
rm -f pidgin/win32/nsis/pidgin-translations.nsh pidgin/win32/nsis/pidgin-spellcheck.nsh pidgin/win32/nsis/pidgin-spellcheck-preselect.nsh
find $(STRIPPED_RELEASE_DIR)/locale -maxdepth 1 -mindepth 1 \
-exec basename {} ';' \
@@ -119,6 +121,13 @@ generate_installer_includes: create_rele
-e "s/ \"[^\"]*\"\ \"[^\"]*\"[\t\ ]*$$//" | \
iconv -f utf-8 -t latin1 \
> pidgin/win32/nsis/pidgin-spellcheck-preselect.nsh
+ #Generate the Installer translations
+ echo "!define GCOMPRIS_NSIS_INCLUDE_PATH \".\"" > $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/langmacros.nsh
+ echo "@INSERT_TRANSLATIONS@" >> $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/langmacros.nsh
+ $(PERL) $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/create_nsis_translations.pl \
+ $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/nsis_translations.desktop \
+ $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/langmacros.nsh \
+ $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/translations
create_release_install_dir: install
rm -rf $(STRIPPED_RELEASE_DIR)
============================================================
--- libpurple/win32/global.mak 00c8fcab9bac77b390264a17d1931a2bb81e815b
+++ libpurple/win32/global.mak 60a49a76352ce3f93ec60b400b9536fd3c2f41d5
@@ -108,6 +108,7 @@ STRIP ?= strip
PERL ?= perl
WINDRES ?= windres
STRIP ?= strip
+INTLTOOL_MERGE ?= $(WIN32_DEV_TOP)/intltool_0.40.4-1_win32/bin/intltool-merge
PIDGIN_COMMON_RULES := $(PURPLE_TOP)/win32/rules.mak
PIDGIN_COMMON_TARGETS := $(PURPLE_TOP)/win32/targets.mak
============================================================
--- libpurple/win32/rules.mak 530dbbf1480cd14cad98759721eb858384f47654
+++ libpurple/win32/rules.mak 17c1af729b3cc1f7da5b81d34f1d7a11d7e8fcdf
@@ -8,3 +8,6 @@
%.o: %.rc
$(WINDRES) -I$(PURPLE_TOP) -i $< -o $@
+
+%.desktop: %.desktop.in $(wildcard $(PIDGIN_TREE_TOP)/po/*.po)
+ LC_ALL=C $(PERL) $(INTLTOOL_MERGE) -d -u -c $(PIDGIN_TREE_TOP)/po/.intltool-merge-cache $(PIDGIN_TREE_TOP)/po $< $@
============================================================
--- pidgin/Makefile.am ef4b5b579fb97e6188ad391e33fc1f6f9579ca3b
+++ pidgin/Makefile.am d36cf2feb571e0b87069a05ce68edfc0efdf3bbc
@@ -28,43 +28,8 @@ EXTRA_DIST = \
win32/nsis/available.lst \
win32/nsis/pidgin-installer.nsi \
win32/nsis/pidgin-plugin.nsh \
- win32/nsis/langmacros.nsh \
- win32/nsis/translations/afrikaans.nsh \
- win32/nsis/translations/albanian.nsh \
- win32/nsis/translations/arabic.nsh \
- win32/nsis/translations/basque.nsh \
- win32/nsis/translations/bulgarian.nsh \
- win32/nsis/translations/catalan.nsh \
- win32/nsis/translations/czech.nsh \
- win32/nsis/translations/danish.nsh \
- win32/nsis/translations/dutch.nsh \
- win32/nsis/translations/english.nsh \
- win32/nsis/translations/finnish.nsh \
- win32/nsis/translations/french.nsh \
- win32/nsis/translations/german.nsh \
- win32/nsis/translations/hebrew.nsh \
- win32/nsis/translations/hungarian.nsh \
- win32/nsis/translations/italian.nsh \
- win32/nsis/translations/japanese.nsh \
- win32/nsis/translations/korean.nsh \
- win32/nsis/translations/kurdish.nsh \
- win32/nsis/translations/lithuanian.nsh \
- win32/nsis/translations/norwegian.nsh \
- win32/nsis/translations/norwegian_nynorsk.nsh \
- win32/nsis/translations/persian.nsh \
- win32/nsis/translations/polish.nsh \
- win32/nsis/translations/portuguese.nsh \
- win32/nsis/translations/portuguese-br.nsh \
- win32/nsis/translations/romanian.nsh \
- win32/nsis/translations/russian.nsh \
- win32/nsis/translations/serbian-latin.nsh \
- win32/nsis/translations/simp-chinese.nsh \
- win32/nsis/translations/slovak.nsh \
- win32/nsis/translations/slovenian.nsh \
- win32/nsis/translations/spanish.nsh \
- win32/nsis/translations/swedish.nsh \
- win32/nsis/translations/trad-chinese.nsh \
- win32/nsis/translations/vietnamese.nsh
+ win32/nsis/create_nsis_translations.pl \
+ win32/nsis/nsis_translations.desktop.in
if ENABLE_GTK
============================================================
--- pidgin/win32/nsis/create_nsis_translations.pl dc753440f44bf0ba985918b8ad67c0ee12fabd13
+++ pidgin/win32/nsis/create_nsis_translations.pl f6660ecc55388f0ca1afb8c583153d1ed5244d14
@@ -288,6 +288,18 @@ $gcomprisLanguages .= " !insertmacro GC
" \"ENGLISH\"".
" \"\${GCOMPRIS_NSIS_INCLUDE_PATH}\\translations\\en.nsh\"\n";
+my $selectTranslationFunction = '
+!macro SELECT_TRANSLATION_SECTION LANG_NAME LANG_CODE
+ StrCmp "$LANGUAGE" "${LANG_${LANG_NAME}}" 0 end_${LANG_CODE}
+ !insertmacro SelectSection ${SecLang_${LANG_CODE}}
+ Goto done
+ end_${LANG_CODE}:
+!macroend
+; Convert the current $LANGUAGE to a language code that we can use for translation mo selection
+; If there\'s a better way to do this, I\'d love to know it
+!macro SELECT_TRANSLATION_FUNCTION
+';
+
#
# Two pass are needed:
# - create the utf8 file
@@ -331,9 +343,11 @@ foreach my $lang (@localeKeys) {
$gcomprisLanguages .= " !insertmacro GCOMPRIS_MACRO_INCLUDE_LANGFILE".
" \"". uc($localeNames{$lang}[0]) . "\"".
" \"\${GCOMPRIS_NSIS_INCLUDE_PATH}\\translations\\$lang.nsh\"\n";
+ $selectTranslationFunction .= " !insertmacro SELECT_TRANSLATION_SECTION".
+ " \"" . uc($localeNames{$lang}[0]) . "\" \"$lang\"\n";
} else {
print "Ignoring language $lang because it is less than 50% translated ($found_key_count of $total_key_count).\n";
- continue;
+ next;
}
@@ -347,6 +361,11 @@ foreach my $lang (@localeKeys) {
}
+$selectTranslationFunction .= '
+done:
+!macroend
+';
+
# We have all the data, let's replace it
my $gcomprisInstaller;
open (MYFILE, $installer);
@@ -356,6 +375,7 @@ while (<MYFILE>) {
print "Processing \@INSERT_TRANSLATIONS\@\n";
$gcomprisInstaller .= $muiLanguages;
$gcomprisInstaller .= $gcomprisLanguages;
+ $gcomprisInstaller .= $selectTranslationFunction;
}
else
{
============================================================
--- pidgin/win32/nsis/nsis_translations.desktop.in 6da25f46f576949137c985c047b4f5842c1dfeec
+++ pidgin/win32/nsis/nsis_translations.desktop.in d3206b53d2163eca27c3b6b9279cbf1705f39830
@@ -1,50 +1,50 @@ Encoding=UTF-8
[Desktop Entry]
Encoding=UTF-8
-_INSTALLER_IS_RUNNING=The installer is already running.
-_PIDGIN_IS_RUNNING=An instance of Pidgin is currently running. Please exit Pidgin and try again.
+_INSTALLERISRUNNING=The installer is already running.
+_PIDGINISRUNNING=An instance of Pidgin is currently running. Please exit Pidgin and try again.
# License Page
-_PIDGIN_LICENSE_BUTTON=Next >
-_PIDGIN_LICENSE_BOTTOM_TEXT=$(^Name) is released under the GNU General Public License (GPL). The license is provided here for information purposes only. $_CLICK
+_PIDGINLICENSEBUTTON=Next >
+_PIDGINLICENSEBOTTOMTEXT=$(^Name) is released under the GNU General Public License (GPL). The license is provided here for information purposes only. $_CLICK
# Components Page
-_PIDGIN_SECTION_TITLE=Pidgin Instant Messaging Client (required)
-_GTK_SECTION_TITLE=GTK+ Runtime (required if not present)
-_PIDGIN_SHORTCUTS_SECTION_TITLE=Shortcuts
-_PIDGIN_DESKTOP_SHORTCUT_SECTION_TITLE=Desktop
-_PIDGIN_STARTMENU_SHORTCUT_SECTION_TITLE=Start Menu
-_TRANSLATIONS_SECTION_TITLE=Localizations
-_PIDGIN_SECTION_DESCRIPTION=Core Pidgin files and dlls
-_GTK_SECTION_DESCRIPTION=A multi-platform GUI toolkit, used by Pidgin
+_PIDGINSECTIONTITLE=Pidgin Instant Messaging Client (required)
+_GTKSECTIONTITLE=GTK+ Runtime (required if not present)
+_PIDGINSHORTCUTSSECTIONTITLE=Shortcuts
+_PIDGINDESKTOPSHORTCUTSECTIONTITLE=Desktop
+_PIDGINSTARTMENUSHORTCUTSECTIONTITLE=Start Menu
+_TRANSLATIONSSECTIONTITLE=Localizations
+_PIDGINSECTIONDESCRIPTION=Core Pidgin files and dlls
+_GTKSECTIONDESCRIPTION=A multi-platform GUI toolkit, used by Pidgin
-_PIDGIN_SHORTCUTS_SECTION_DESCRIPTION=Shortcuts for starting Pidgin
-_PIDGIN_DESKTOP_SHORTCUT_DESC=Create a shortcut to Pidgin on the Desktop
-_PIDGIN_STARTMENU_SHORTCUT_DESC=Create a Start Menu entry for Pidgin
-_DEBUG_SYMBOLS_SECTION_TITLE=Debug Symbols (for reporting crashes)
+_PIDGINSHORTCUTSSECTIONDESCRIPTION=Shortcuts for starting Pidgin
+_PIDGINDESKTOPSHORTCUTDESC=Create a shortcut to Pidgin on the Desktop
+_PIDGINSTARTMENUSHORTCUTDESC=Create a Start Menu entry for Pidgin
+_DEBUGSYMBOLSSECTIONTITLE=Debug Symbols (for reporting crashes)
# Installer Finish Page
-_PIDGIN_FINISH_VISIT_WEB_SITE=Visit the Pidgin Web Page
+_PIDGINFINISHVISITWEBSITE=Visit the Pidgin Web Page
# Pidgin Section Prompts and Texts
-_PIDGIN_PROMPT_CONTINUE_WITHOUT_UNINSTALL=Unable to uninstall the currently installed version of Pidgin. The new version will be installed without removing the currently installed version.
+_PIDGINPROMPTCONTINUEWITHOUTUNINSTALL=Unable to uninstall the currently installed version of Pidgin. The new version will be installed without removing the currently installed version.
# GTK+ Section Prompts
-_PIDGIN_PROMPT_FORCE_NO_GTK=Pidgin requires a compatible GTK+ Runtime (which doesn't appear to be already present).$\rAre you sure you want to skip installing the GTK+ Runtime?
+_PIDGINPROMPTFORCENOGTK=Pidgin requires a compatible GTK+ Runtime (which doesn't appear to be already present).$\rAre you sure you want to skip installing the GTK+ Runtime?
# URL Handler section
-_URI_HANDLERS_SECTION_TITLE=URI Handlers
+_URIHANDLERSSECTIONTITLE=URI Handlers
#Spellcheck Section Prompts
-_PIDGIN_SPELLCHECK_SECTION_TITLE=Spellchecking Support
-_PIDGIN_SPELLCHECK_ERROR=Error Installing Spellchecking ($R3).$\rIf retrying fails, manual installation instructions are at: http://developer.pidgin.im/wiki/Installing%20Pidgin#manual_win32_spellcheck_installation
-_PIDGIN_SPELLCHECK_SECTION_DESCRIPTION=Support for Spellchecking. (Internet connection required for installation)
+_PIDGINSPELLCHECKSECTIONTITLE=Spellchecking Support
+_PIDGINSPELLCHECKERROR=Error Installing Spellchecking ($R3).$\rIf retrying fails, manual installation instructions are at: http://developer.pidgin.im/wiki/Installing%20Pidgin#manual_win32_spellcheck_installation
+_PIDGINSPELLCHECKSECTIONDESCRIPTION=Support for Spellchecking. (Internet connection required for installation)
-_PIDGIN_DEBUGSYMBOLS_ERROR=Error Installing Debug Symbols ($R2).$\rIf retrying fails, you may need to use the 'Offline Installer' from http://pidgin.im/download/windows/ .
+_PIDGINDEBUGSYMBOLSERROR=Error Installing Debug Symbols ($R2).$\rIf retrying fails, you may need to use the 'Offline Installer' from http://pidgin.im/download/windows/ .
-_PIDGIN_GTK_DOWNLOAD_ERROR=Error Downloading the GTK+ Runtime ($R2).$\rThis is required for Pidgin to function; if retrying fails, you may need to use the 'Offline Installer' from http://pidgin.im/download/windows/ .
+_PIDGINGTKDOWNLOADERROR=Error Downloading the GTK+ Runtime ($R2).$\rThis is required for Pidgin to function; if retrying fails, you may need to use the 'Offline Installer' from http://pidgin.im/download/windows/ .
# Uninstall Section Prompts
-_un.PIDGIN_UNINSTALL_ERROR_1=The uninstaller could not find registry entries for Pidgin.$\rIt is likely that another user installed this application.
-_un.PIDGIN_UNINSTALL_ERROR_2=You do not have permission to uninstall this application.
+_PIDGINUNINSTALLERROR1=The uninstaller could not find registry entries for Pidgin.$\rIt is likely that another user installed this application.
+_PIDGINUNINSTALLERROR2=You do not have permission to uninstall this application.
============================================================
--- pidgin/win32/nsis/pidgin-installer.nsi cc27f8628e6a5ec240c9c05a3db83bed50c66d54
+++ pidgin/win32/nsis/pidgin-installer.nsi 3d7e56be8271360190ec10da9d78c1508658b31f
@@ -107,8 +107,8 @@ ReserveFile "${NSISDIR}\Plugins\System.d
!define MUI_HEADERIMAGE_BITMAP ".\pixmaps\pidgin-header.bmp"
; Alter License section
- !define MUI_LICENSEPAGE_BUTTON $(PIDGIN_LICENSE_BUTTON)
- !define MUI_LICENSEPAGE_TEXT_BOTTOM $(PIDGIN_LICENSE_BOTTOM_TEXT)
+ !define MUI_LICENSEPAGE_BUTTON $(PIDGINLICENSEBUTTON)
+ !define MUI_LICENSEPAGE_TEXT_BOTTOM $(PIDGINLICENSEBOTTOMTEXT)
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY ${PIDGIN_REG_KEY}
@@ -121,7 +121,7 @@ ReserveFile "${NSISDIR}\Plugins\System.d
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN "$INSTDIR\pidgin.exe"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
- !define MUI_FINISHPAGE_LINK $(PIDGIN_FINISH_VISIT_WEB_SITE)
+ !define MUI_FINISHPAGE_LINK $(PIDGINFINISHVISITWEBSITE)
!define MUI_FINISHPAGE_LINK_LOCATION "http://pidgin.im"
;--------------------------------
@@ -146,90 +146,8 @@ ReserveFile "${NSISDIR}\Plugins\System.d
;--------------------------------
;Languages
- ;; English goes first because its the default. The rest are
- ;; in alphabetical order (at least the strings actually displayed
- ;; will be).
-
- !insertmacro MUI_LANGUAGE "English"
-
- !insertmacro MUI_LANGUAGE "Afrikaans"
- !insertmacro MUI_LANGUAGE "Albanian"
- !insertmacro MUI_LANGUAGE "Arabic"
- !insertmacro MUI_LANGUAGE "Basque"
- !insertmacro MUI_LANGUAGE "Bulgarian"
- !insertmacro MUI_LANGUAGE "Catalan"
- !insertmacro MUI_LANGUAGE "Czech"
- !insertmacro MUI_LANGUAGE "Danish"
- !insertmacro MUI_LANGUAGE "SimpChinese"
- !insertmacro MUI_LANGUAGE "TradChinese"
- !insertmacro MUI_LANGUAGE "German"
- !insertmacro MUI_LANGUAGE "Spanish"
- !insertmacro MUI_LANGUAGE "Farsi"
- !insertmacro MUI_LANGUAGE "Finnish"
- !insertmacro MUI_LANGUAGE "French"
- !insertmacro MUI_LANGUAGE "Hebrew"
- !insertmacro MUI_LANGUAGE "Italian"
- !insertmacro MUI_LANGUAGE "Japanese"
- !insertmacro MUI_LANGUAGE "Korean"
- !insertmacro MUI_LANGUAGE "Kurdish"
- !insertmacro MUI_LANGUAGE "Lithuanian"
- !insertmacro MUI_LANGUAGE "Hungarian"
- !insertmacro MUI_LANGUAGE "Dutch"
- !insertmacro MUI_LANGUAGE "Norwegian"
- !insertmacro MUI_LANGUAGE "NorwegianNynorsk"
- !insertmacro MUI_LANGUAGE "Polish"
- !insertmacro MUI_LANGUAGE "PortugueseBR"
- !insertmacro MUI_LANGUAGE "Portuguese"
- !insertmacro MUI_LANGUAGE "Romanian"
- !insertmacro MUI_LANGUAGE "Russian"
- !insertmacro MUI_LANGUAGE "Serbian"
- !insertmacro MUI_LANGUAGE "Slovak"
- !insertmacro MUI_LANGUAGE "Slovenian"
- !insertmacro MUI_LANGUAGE "Swedish"
-
-;--------------------------------
-;Translations
-
- !define PIDGIN_DEFAULT_LANGFILE "${PIDGIN_NSIS_INCLUDE_PATH}\translations\english.nsh"
-
!include "${PIDGIN_NSIS_INCLUDE_PATH}\langmacros.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "AFRIKAANS" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\afrikaans.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "ALBANIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\albanian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "ARABIC" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\arabic.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "BASQUE" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\basque.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "BULGARIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\bulgarian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "CATALAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\catalan.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "CZECH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\czech.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "DANISH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\danish.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "DUTCH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\dutch.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "ENGLISH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\english.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "FARSI" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\persian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "FINNISH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\finnish.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "FRENCH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\french.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "GERMAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\german.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "HEBREW" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\hebrew.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "HUNGARIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\hungarian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "ITALIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\italian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "JAPANESE" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\japanese.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "KOREAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\korean.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "KURDISH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\kurdish.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "LITHUANIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\lithuanian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "NORWEGIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\norwegian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "NORWEGIANNYNORSK" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\norwegian_nynorsk.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "POLISH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\polish.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "PORTUGUESE" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\portuguese.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "PORTUGUESEBR" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\portuguese-br.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "ROMANIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\romanian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "RUSSIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\russian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "SERBIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\serbian-latin.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "SIMPCHINESE" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\simp-chinese.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "SLOVAK" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\slovak.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "SLOVENIAN" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\slovenian.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "SPANISH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\spanish.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "SWEDISH" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\swedish.nsh"
- !insertmacro PIDGIN_MACRO_INCLUDE_LANGFILE "TRADCHINESE" "${PIDGIN_NSIS_INCLUDE_PATH}\translations\trad-chinese.nsh"
-
;--------------------------------
;Reserve Files
; Only need this if using bzip2 compression
@@ -324,7 +242,7 @@ Section -SecUninstallOldPidgin
uninstall_problem:
; We can't uninstall. Either the user must manually uninstall or we ignore and reinstall over it.
- MessageBox MB_OKCANCEL $(PIDGIN_PROMPT_CONTINUE_WITHOUT_UNINSTALL) /SD IDOK IDOK done
+ MessageBox MB_OKCANCEL $(PIDGINPROMPTCONTINUEWITHOUTUNINSTALL) /SD IDOK IDOK done
Quit
done:
SectionEnd
@@ -333,7 +251,7 @@ SectionEnd
;--------------------------------
;GTK+ Runtime Install Section
-Section $(GTK_SECTION_TITLE) SecGtk
+Section $(GTKSECTIONTITLE) SecGtk
InitPluginsDir
StrCpy $R1 "$PLUGINSDIR\gtk.zip"
@@ -352,7 +270,7 @@ Section $(GTK_SECTION_TITLE) SecGtk
Pop $R0
StrCmp $R0 "cancel" done
StrCmp $R0 "success" +2
- MessageBox MB_RETRYCANCEL "$(PIDGIN_GTK_DOWNLOAD_ERROR)" /SD IDCANCEL IDRETRY retry IDCANCEL done
+ MessageBox MB_RETRYCANCEL "$(PIDGINGTKDOWNLOADERROR)" /SD IDCANCEL IDRETRY retry IDCANCEL done
!endif
@@ -371,7 +289,7 @@ SectionEnd ; end of GTK+ section
;--------------------------------
;Pidgin Install Section
-Section $(PIDGIN_SECTION_TITLE) SecPidgin
+Section $(PIDGINSECTIONTITLE) SecPidgin
SectionIn 1 RO
; Check install rights..
@@ -470,13 +388,13 @@ SectionEnd ; end of default Pidgin secti
;--------------------------------
;Shortcuts
-SectionGroup /e $(PIDGIN_SHORTCUTS_SECTION_TITLE) SecShortcuts
- Section /o $(PIDGIN_DESKTOP_SHORTCUT_SECTION_TITLE) SecDesktopShortcut
+SectionGroup /e $(PIDGINSHORTCUTSSECTIONTITLE) SecShortcuts
+ Section /o $(PIDGINDESKTOPSHORTCUTSECTIONTITLE) SecDesktopShortcut
SetOverwrite on
CreateShortCut "$DESKTOP\Pidgin.lnk" "$INSTDIR\pidgin.exe"
SetOverwrite off
SectionEnd
- Section $(PIDGIN_STARTMENU_SHORTCUT_SECTION_TITLE) SecStartMenuShortcut
+ Section $(PIDGINSTARTMENUSHORTCUTSECTIONTITLE) SecStartMenuShortcut
SetOverwrite on
CreateShortCut "$SMPROGRAMS\Pidgin.lnk" "$INSTDIR\pidgin.exe"
SetOverwrite off
@@ -492,7 +410,7 @@ SectionGroupEnd
Call RegisterURIHandler
SectionEnd
!macroend
-SectionGroup /e $(URI_HANDLERS_SECTION_TITLE) SecURIHandlers
+SectionGroup /e $(URIHANDLERSSECTIONTITLE) SecURIHandlers
!insertmacro URI_SECTION "aim"
!insertmacro URI_SECTION "msnim"
!insertmacro URI_SECTION "myim"
@@ -510,7 +428,7 @@ SectionGroupEnd
SetOutPath "$INSTDIR"
${MementoSectionEnd}
!macroend
-SectionGroup $(TRANSLATIONS_SECTION_TITLE) SecTranslations
+SectionGroup $(TRANSLATIONSSECTIONTITLE) SecTranslations
# pidgin-translations is generated based on the contents of the locale directory
!include "pidgin-translations.nsh"
SectionGroupEnd
@@ -526,11 +444,11 @@ ${MementoSectionDone}
Call InstallDict
SectionEnd
!macroend
-SectionGroup $(PIDGIN_SPELLCHECK_SECTION_TITLE) SecSpellCheck
+SectionGroup $(PIDGINSPELLCHECKSECTIONTITLE) SecSpellCheck
!include "pidgin-spellcheck.nsh"
SectionGroupEnd
-Section /o $(DEBUG_SYMBOLS_SECTION_TITLE) SecDebugSymbols
+Section /o $(DEBUGSYMBOLSSECTIONTITLE) SecDebugSymbols
InitPluginsDir
StrCpy $R1 "$PLUGINSDIR\dbgsym.zip"
@@ -549,7 +467,7 @@ Section /o $(DEBUG_SYMBOLS_SECTION_TITLE
Pop $R0
StrCmp $R0 "cancel" done
StrCmp $R0 "success" +2
- MessageBox MB_RETRYCANCEL "$(PIDGIN_DEBUGSYMBOLS_ERROR)" /SD IDCANCEL IDRETRY retry IDCANCEL done
+ MessageBox MB_RETRYCANCEL "$(PIDGINDEBUGSYMBOLSERROR)" /SD IDCANCEL IDRETRY retry IDCANCEL done
!endif
@@ -750,11 +668,11 @@ Section Uninstall
Goto done
cant_uninstall:
- MessageBox MB_OK $(un.PIDGIN_UNINSTALL_ERROR_1) /SD IDOK
+ MessageBox MB_OK $(PIDGINUNINSTALLERROR1) /SD IDOK
Quit
no_rights:
- MessageBox MB_OK $(un.PIDGIN_UNINSTALL_ERROR_2) /SD IDOK
+ MessageBox MB_OK $(PIDGINUNINSTALLERROR2) /SD IDOK
Quit
done:
@@ -764,19 +682,19 @@ SectionEnd ; end of uninstall section
;Descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecPidgin} \
- $(PIDGIN_SECTION_DESCRIPTION)
+ $(PIDGINSECTIONDESCRIPTION)
!insertmacro MUI_DESCRIPTION_TEXT ${SecGtk} \
- $(GTK_SECTION_DESCRIPTION)
+ $(GTKSECTIONDESCRIPTION)
!insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} \
- $(PIDGIN_SHORTCUTS_SECTION_DESCRIPTION)
+ $(PIDGINSHORTCUTSSECTIONDESCRIPTION)
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopShortcut} \
- $(PIDGIN_DESKTOP_SHORTCUT_DESC)
+ $(PIDGINDESKTOPSHORTCUTDESC)
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenuShortcut} \
- $(PIDGIN_STARTMENU_SHORTCUT_DESC)
+ $(PIDGINSTARTMENUSHORTCUTDESC)
!insertmacro MUI_DESCRIPTION_TEXT ${SecSpellCheck} \
- $(PIDGIN_SPELLCHECK_SECTION_DESCRIPTION)
+ $(PIDGINSPELLCHECKSECTIONDESCRIPTION)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
@@ -1068,7 +986,7 @@ Function ${UN}RunCheck
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "pidgin_is_running") i .R1 ?e'
Pop $R0
IntCmp $R0 0 +3 ;This could check for ERROR_ALREADY_EXISTS(183), but lets just assume
- MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(PIDGIN_IS_RUNNING) /SD IDCANCEL IDRETRY retry_runcheck
+ MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(PIDGINISRUNNING) /SD IDCANCEL IDRETRY retry_runcheck
Abort
; Close the Handle (If we don't do this, the uninstaller called from within will fail)
@@ -1098,7 +1016,7 @@ Function .onInit
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "pidgin_installer_running") i .R1 ?e'
Pop $R0
IntCmp $R0 0 +3 ;This could check for ERROR_ALREADY_EXISTS(183), but lets just assume
- MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(INSTALLER_IS_RUNNING) /SD IDCANCEL IDRETRY retry_runcheck
+ MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(INSTALLERISRUNNING) /SD IDCANCEL IDRETRY retry_runcheck
Abort
; Allow installer to run even if pidgin is running via "/NOPIDGINRUNCHECK=1"
@@ -1289,129 +1207,17 @@ Function .onSelChange
StrCmp $WARNED_GTK_STATE "1" done
IntCmp $CURRENT_GTK_STATE 1 done done 0
StrCpy $WARNED_GTK_STATE "1"
- MessageBox MB_YESNO $(PIDGIN_PROMPT_FORCE_NO_GTK) /SD IDNO IDYES done
+ MessageBox MB_YESNO $(PIDGINPROMPTFORCENOGTK) /SD IDNO IDYES done
!insertmacro SelectSection ${SecGtk}
done:
Pop $R0
FunctionEnd
-
-; Convert the current $LANGUAGE to a language code that we can use for translation mo selection
-; If there's a better way to do this, I'd love to know it
Function SelectTranslationForCurrentLanguage
-
- StrCmp "$LANGUAGE" "1078" 0 sq
- !insertmacro SelectSection ${SecLang_af}
- Goto done
- sq: StrCmp "$LANGUAGE" "1052" 0 ar
- !insertmacro SelectSection ${SecLang_sq}
- Goto done
- ar: StrCmp "$LANGUAGE" "1025" 0 eu
- !insertmacro SelectSection ${SecLang_ar}
- Goto done
- eu: StrCmp "$LANGUAGE" "1069" 0 bg
- !insertmacro SelectSection ${SecLang_eu}
- Goto done
- bg: StrCmp "$LANGUAGE" "1026" 0 ca
- !insertmacro SelectSection ${SecLang_bg}
- Goto done
- ca: StrCmp "$LANGUAGE" "1027" 0 cs
- !insertmacro SelectSection ${SecLang_ca}
- Goto done
- cs: StrCmp "$LANGUAGE" "1029" 0 da
- !insertmacro SelectSection ${SecLang_cs}
- Goto done
- da: StrCmp "$LANGUAGE" "1030" 0 nl
- !insertmacro SelectSection ${SecLang_da}
- Goto done
- nl: StrCmp "$LANGUAGE" "1043" 0 fa
- !insertmacro SelectSection ${SecLang_nl}
- Goto done
- ;We have several English translations, but we don't have a way of guessing, so we don't choose one
- ;en: StrCmp "$LANGUAGE" "1033" 0 +3
- ;!insertmacro SelectSection ${SecLang_en_??}
- ;Goto done
- fa: StrCmp "$LANGUAGE" "1065" 0 fi
- !insertmacro SelectSection ${SecLang_fa}
- Goto done
- fi: StrCmp "$LANGUAGE" "1035" 0 fr
- !insertmacro SelectSection ${SecLang_fi}
- Goto done
- fr: StrCmp "$LANGUAGE" "1036" 0 de
- !insertmacro SelectSection ${SecLang_fr}
- Goto done
- de: StrCmp "$LANGUAGE" "1031" 0 he
- !insertmacro SelectSection ${SecLang_de}
- Goto done
- he: StrCmp "$LANGUAGE" "1037" 0 hu
- !insertmacro SelectSection ${SecLang_he}
- Goto done
- hu: StrCmp "$LANGUAGE" "1038" 0 it
- !insertmacro SelectSection ${SecLang_hu}
- Goto done
- it: StrCmp "$LANGUAGE" "1040" 0 ja
- !insertmacro SelectSection ${SecLang_it}
- Goto done
- ja: StrCmp "$LANGUAGE" "1041" 0 ko
- !insertmacro SelectSection ${SecLang_ja}
- Goto done
- ko: StrCmp "$LANGUAGE" "1042" 0 ku
- !insertmacro SelectSection ${SecLang_ko}
- Goto done
- ku: StrCmp "$LANGUAGE" "9999" 0 lt
- !insertmacro SelectSection ${SecLang_ku}
- Goto done
- lt: StrCmp "$LANGUAGE" "1063" 0 nb
- !insertmacro SelectSection ${SecLang_lt}
- Goto done
- nb: StrCmp "$LANGUAGE" "1044" 0 nn
- !insertmacro SelectSection ${SecLang_nb}
- Goto done
- nn: StrCmp "$LANGUAGE" "2068" 0 pl
- !insertmacro SelectSection ${SecLang_nn}
- Goto done
- pl: StrCmp "$LANGUAGE" "1045" 0 pt
- !insertmacro SelectSection ${SecLang_pl}
- Goto done
- pt: StrCmp "$LANGUAGE" "2070" 0 pt_BR
- !insertmacro SelectSection ${SecLang_pt}
- Goto done
- pt_BR: StrCmp "$LANGUAGE" "1046" 0 ro
- !insertmacro SelectSection ${SecLang_pt_BR}
- Goto done
- ro: StrCmp "$LANGUAGE" "1048" 0 ru
- !insertmacro SelectSection ${SecLang_ro}
- Goto done
- ru: StrCmp "$LANGUAGE" "1049" 0 sr
- !insertmacro SelectSection ${SecLang_ru}
- Goto done
- sr: StrCmp "$LANGUAGE" "3098" 0 zh_CN
- !insertmacro SelectSection ${SecLang_sr}
- Goto done
- zh_CN: StrCmp "$LANGUAGE" "2052" 0 sk
- !insertmacro SelectSection ${SecLang_zh_CN}
- Goto done
- sk: StrCmp "$LANGUAGE" "1051" 0 sl
- !insertmacro SelectSection ${SecLang_sk}
- Goto done
- sl: StrCmp "$LANGUAGE" "1060" 0 es
- !insertmacro SelectSection ${SecLang_sl}
- Goto done
- es: StrCmp "$LANGUAGE" "1034" 0 sv
- !insertmacro SelectSection ${SecLang_es}
- Goto done
- sv: StrCmp "$LANGUAGE" "1053" 0 zh_TW
- !insertmacro SelectSection ${SecLang_sv}
- Goto done
- zh_TW: StrCmp "$LANGUAGE" "1028" 0 done
- !insertmacro SelectSection ${SecLang_zh_TW}
- Goto done
-
- done:
+!insertmacro SELECT_TRANSLATION_FUNCTION
FunctionEnd
-
; SpellChecker Related Functions
;-------------------------------
@@ -1465,7 +1271,7 @@ Function InstallDict
Pop $R4
StrCmp $R4 "cancel" done
StrCmp $R4 "success" +3
- MessageBox MB_RETRYCANCEL "$(PIDGIN_SPELLCHECK_ERROR)" /SD IDCANCEL IDRETRY retry IDCANCEL done
+ MessageBox MB_RETRYCANCEL "$(PIDGINSPELLCHECKERROR)" /SD IDCANCEL IDRETRY retry IDCANCEL done
Goto done
SetOutPath "$INSTDIR\spellcheck\share\enchant\myspell"
nsisunz::UnzipToLog "$R2" "$OUTDIR"
More information about the Commits
mailing list