From be16dd666139e867b0d26998c1421f1e4106ba17 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 11 Jun 2016 23:19:34 +0000 Subject: translations (2jun16) git-svn-id: svn://tug.org/texlive/trunk@41384 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/translations/translations.sty | 67 +++++++++++++++------- 1 file changed, 46 insertions(+), 21 deletions(-) (limited to 'Master/texmf-dist/tex/latex/translations') diff --git a/Master/texmf-dist/tex/latex/translations/translations.sty b/Master/texmf-dist/tex/latex/translations/translations.sty index 23228043c97..e3386880aca 100644 --- a/Master/texmf-dist/tex/latex/translations/translations.sty +++ b/Master/texmf-dist/tex/latex/translations/translations.sty @@ -25,9 +25,9 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- -\def\@trnslt@date{2016/04/19} -\def\@trnslt@version{v1.3} -\def\@trnslt@info{internationalization of LaTeX2e packages} +\newcommand*\@trnslt@date{2016/06/02} +\newcommand*\@trnslt@version{v1.4a} +\newcommand*\@trnslt@info{internationalization of LaTeX2e packages} \ProvidesPackage{translations}[% \@trnslt@date\space @@ -38,7 +38,7 @@ % -------------------------------------------------------------------------- % message handling % generic help message: -\def\@trnslt@error@message{% +\newcommand*\@trnslt@error@message{% For details have a look at the `translations' manual.% } @@ -277,31 +277,50 @@ % #1: language % #2: word % #3: replacement -\newrobustcmd*\DeclareTranslation[3]{% +\newrobustcmd*\declaretranslation[3]{% \@trnslt@declare@translation{#2}{#1}{#3}% } -\@onlypreamble\DeclareTranslation - -\newrobustcmd*\DeclareTranslationFallback[2]{% - \@trnslt@declare@translation{#1}{fallback}{#2}% -} -\@onlypreamble\DeclareTranslationFallback - -\newrobustcmd*\NewTranslation[3]{% +\newrobustcmd*\definetranslation[3]{% \@trnslt@new@translation{#2}{#1}{#3}% } -\@onlypreamble\NewTranslation - -\newrobustcmd*\RenewTranslation[3]{% +\newrobustcmd*\redefinetranslation[3]{% \@trnslt@renew@translation{#2}{#1}{#3}% } -\@onlypreamble\RenewTranslation - -\newrobustcmd*\ProvideTranslation[3]{% +\newrobustcmd*\addtranslation[3]{% \@trnslt@provide@translation{#2}{#1}{#3}% } + +\let\DeclareTranslation\declaretranslation +\@onlypreamble\DeclareTranslation +\let\NewTranslation\definetranslation +\@onlypreamble\NewTranslation +\let\RenewTranslation\redefinetranslation +\@onlypreamble\RenewTranslation +\let\ProvideTranslation\addtranslation \@onlypreamble\ProvideTranslation +\newrobustcmd*\declaretranslationfallback{% + \declaretranslation{fallback}% +} +\newrobustcmd*\definetranslationfallback{% + \definetranslation{fallback}% +} +\newrobustcmd*\redefinetranslationfallback{% + \redefinetranslation{fallback}% +} +\newrobustcmd*\addtranslationfallback{% + \addtranslation{fallback}% +} + +\let\DeclareTranslationFallback\declaretranslationfallback +\@onlypreamble\DeclareTranslationFallback +\let\NewTranslationFallback\definetranslationfallback +\@onlypreamble\NewTranslationFallback +\let\RenewTranslationFallback\redefinetranslationfallback +\@onlypreamble\RenewTranslationFallback +\let\ProvideTranslationFallback\addtranslationfallback +\@onlypreamble\ProvideTranslationFallback + % #1: word % #2: language % #3: replacement @@ -700,7 +719,7 @@ \newcommand*\@trnslt@print@dictionary@entry@aux[5]{#1#4#2#5#3} % ========================================================================== -% Now that the package is finished let's us the above commands to provide a +% Now that the package is finished let's use the above commands to provide a % basis for usage; we need all languages known to `babel' and `polyglossia' % as well as aliases to allow different spellings/names; we also need dialects % where it makes sense (e.g. British as a dialect of English) @@ -1105,10 +1124,16 @@ 2015/11/07 v1.2e - Some fixes to the French translations in the basic dictionary, thanks to Denis Bitouz\'e - add Macedonian language -2016/01/20 v1.3 - \LoadDictionary first checks if a dictionary for the +2016/04/19 v1.3 - \LoadDictionary first checks if a dictionary for the dialect exists and loads it if it does; else it looks for a dictionary of the base language and loads that instead - New command \LoadDictionaryForDialect which only loads the dictionary for a specified dialect – this doesn't check if a dictionary for a baselanguage exists +2016/06/02 v1.4 - new commands \declaretranslation, \newtranslation, + \renewtranslation and \providetranslation which can be + used after begin document + - fallback versions for each definition command +2016/06/02 v1.4a - rename new commands: they conflict with the translator + package! -- cgit v1.2.3