;;
;; Windows Ekiga NSIS installer language macros
;;

!macro EKIGA_MACRO_DEFAULT_STRING LABEL VALUE
  !ifndef "${LABEL}"
    !define "${LABEL}" "${VALUE}"
    !ifdef INSERT_DEFAULT
      !warning "${LANG} lang file missing ${LABEL}, using default..."
    !endif
  !endif
!macroend

!macro EKIGA_MACRO_LANGSTRING_INSERT LABEL LANG
  LangString "${LABEL}" "${LANG_${LANG}}" "${${LABEL}}"
  !undef "${LABEL}"
!macroend

!macro EKIGA_MACRO_LANGUAGEFILE_BEGIN LANG
  !define CUR_LANG "${LANG}"
!macroend

!macro EKIGA_MACRO_LANGUAGEFILE_END
  !define INSERT_DEFAULT
  !include "${EKIGA_DEFAULT_LANGFILE}"
  !undef INSERT_DEFAULT

  ; String labels should match those from the default language file.

  ; Startup checks
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT INSTALLER_IS_RUNNING		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_IS_RUNNING			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_INSTALLER_NEEDED		${CUR_LANG}

  ; License Page
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_LICENSE_BUTTON			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_LICENSE_BOTTOM_TEXT		${CUR_LANG}

  ; Components Page
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_SECTION_TITLE			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_SECTION_TITLE			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_THEMES_SECTION_TITLE		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_NOTHEME_SECTION_TITLE		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_WIMP_SECTION_TITLE		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_BLUECURVE_SECTION_TITLE		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_LIGHTHOUSEBLUE_SECTION_TITLE	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_SHORTCUTS_SECTION_TITLE	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_DESKTOP_SHORTCUT_SECTION_TITLE ${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_STARTMENU_SHORTCUT_SECTION_TITLE	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_SECTION_DESCRIPTION		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_SECTION_DESCRIPTION		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_THEMES_SECTION_DESCRIPTION	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_NO_THEME_DESC			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_WIMP_THEME_DESC			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_BLUECURVE_THEME_DESC		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_LIGHTHOUSEBLUE_THEME_DESC	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_STARTUP_SECTION_DESCRIPTION	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_SHORTCUTS_SECTION_DESCRIPTION	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_DESKTOP_SHORTCUT_DESC		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_STARTMENU_SHORTCUT_DESC	${CUR_LANG}

  ; GTK+ Directory Page
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_UPGRADE_PROMPT			${CUR_LANG}

  ; Installer Finish Page
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_FINISH_VISIT_WEB_SITE		${CUR_LANG}

  ; Ekiga Section Prompts and Texts
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_UNINSTALL_DESC			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_PROMPT_CONTINUE_WITHOUT_UNINSTALL	${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT EKIGA_RUN_AT_STARTUP		${CUR_LANG}

  ; GTK+ Section Prompts
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_INSTALL_ERROR			${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_BAD_INSTALL_PATH		${CUR_LANG}

  ; GTK+ Themes section
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT GTK_NO_THEME_INSTALL_RIGHTS		${CUR_LANG}

  ; Uninstall Section Prompts
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT un.EKIGA_UNINSTALL_ERROR_1		${CUR_LANG}
  !insertmacro EKIGA_MACRO_LANGSTRING_INSERT un.EKIGA_UNINSTALL_ERROR_2		${CUR_LANG}

  !undef CUR_LANG
!macroend

!macro EKIGA_MACRO_INCLUDE_LANGFILE LANG FILE
  !insertmacro EKIGA_MACRO_LANGUAGEFILE_BEGIN "${LANG}"
  !include "${FILE}"
  !insertmacro EKIGA_MACRO_LANGUAGEFILE_END
!macroend
