summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-11 23:19:34 +0000
committerKarl Berry <karl@freefriends.org>2016-06-11 23:19:34 +0000
commitbe16dd666139e867b0d26998c1421f1e4106ba17 (patch)
tree2abd28016f3ed4ba090205a13b6d99e8c4920bf1
parentfbb20601c6298bc825560a5a048859d60217f14f (diff)
translations (2jun16)
git-svn-id: svn://tug.org/texlive/trunk@41384 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/translations/README2
-rw-r--r--Master/texmf-dist/doc/latex/translations/translations_en.pdfbin554471 -> 558863 bytes
-rw-r--r--Master/texmf-dist/doc/latex/translations/translations_en.tex67
-rw-r--r--Master/texmf-dist/tex/latex/translations/translations.sty67
4 files changed, 103 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/latex/translations/README b/Master/texmf-dist/doc/latex/translations/README
index bd11fe68be6..19a8d38b0a4 100644
--- a/Master/texmf-dist/doc/latex/translations/README
+++ b/Master/texmf-dist/doc/latex/translations/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the TRANSLATIONS package v1.3 - 2016/04/19
+the TRANSLATIONS package v1.4a - 2016/06/02
internationalization of LaTeX2e packages
--------------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/translations/translations_en.pdf b/Master/texmf-dist/doc/latex/translations/translations_en.pdf
index 8d8c6863079..acf665980ba 100644
--- a/Master/texmf-dist/doc/latex/translations/translations_en.pdf
+++ b/Master/texmf-dist/doc/latex/translations/translations_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/translations/translations_en.tex b/Master/texmf-dist/doc/latex/translations/translations_en.tex
index ceff08981a6..96a83310a3b 100644
--- a/Master/texmf-dist/doc/latex/translations/translations_en.tex
+++ b/Master/texmf-dist/doc/latex/translations/translations_en.tex
@@ -47,16 +47,28 @@
DeclareLanguageAlias,
DeclareLanguageDialect,
DeclareTranslation,
+ declaretranslation,
DeclareTranslationFallback,
+ declaretranslationfallback,
GetTranslation,
GetTranslationFor,
IfTranslation,
LoadDictionary,
LoadDictionaryFor,
NewTranslation,
+ definetranslation,
+ NewTranslationFallback,
+ definetranslationfallback,
ProvideDictionaryFor,
ProvideDictTranslation,
+ ProvideTranslation,
+ addtranslation,
+ ProvideTranslationFallback,
+ addtranslationfallback,
RenewTranslation,
+ redefinetranslation,
+ RenewTranslationFallback,
+ redefinetranslationfallback,
SaveTranslation,
SaveTranslationFor
} ,
@@ -249,26 +261,59 @@ Commands without the marker aren't expandable.
\translations.
\command{NewTranslation}[\marg{lang}\marg{key}\marg{translation}]
Defines a translation of key \meta{key} for the language \meta{lang}.
- An error will be raised if a translation of \meta{key} already exists.
- This command can only be used in the preamble.
+ An error will be raised if a translation of \meta{key} in language
+ \marg{lang} already exists. This command can only be used in the
+ preamble.
+ \command{NewTranslationFallback}[\marg{key}\marg{translation}]
+ \sinceversion{1.4}Defines a fallback translation of key \meta{key} for the
+ language \meta{lang}. An error will be raised if a fallback translation of
+ \meta{key} already exists. This command can only be used in the preamble.
\command{RenewTranslation}[\marg{lang}\marg{key}\marg{translation}]
Redefines a translation of key \meta{key} for the language \meta{lang}.
- An error will be raised if no translation of \meta{key} exists.
- This command can only be used in the preamble.
+ An error will be raised if no translation of \meta{key} in language
+ \meta{lang} exists. This command can only be used in the preamble.
+ \command{RenewTranslationFallback}[\marg{key}\marg{translation}]
+ \sinceversion{1.4}Renews a fallback translation. This command can only be
+ used in the preamble.
\command{ProvideTranslation}[\marg{lang}\marg{key}\marg{translation}]
\sinceversion{1.2}Provides a translation of key \meta{key} for the
- language \meta{lang}. If a translation of \meta{key} already exists it
- won't be overwritten and no error will be raised. This command can only
+ language \meta{lang}. If a translation of \meta{key} in language
+ \meta{lang} already exists it won't be overwritten and no error will be
+ raised. This command can only be used in the preamble.
+ \command{ProvideTranslationFallback}[\marg{key}\marg{translation}]
+ \sinceversion{1.4}Provides a fallback translation. This command can only
be used in the preamble.
\command{DeclareTranslation}[\marg{lang}\marg{key}\marg{translation}]
Defines a translation of key \meta{key} for the language \meta{lang}.
No error will be raised if a translation of \meta{key} already exists.
This command can only be used in the preamble.
\command{DeclareTranslationFallback}[\marg{key}\marg{fallback}]
- Defines a fallback translation for key \meta{key} that is used in case no
- translation of \meta{key} for the currently active language has been
- provided. No error will be raised if a fallback for \meta{key} already
- exists. This command can only be used in the preamble.
+ Declares a fallback translation. This command can only be used in the
+ preamble.
+ \command{definetranslation}[\marg{lang}\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{NewTranslation} that \emph{can} be used
+ after begin document.
+ \command{definetranslationfallback}[\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{NewTranslationFallback} that \emph{can}
+ be used after begin document.
+ \command{redefinetranslation}[\marg{lang}\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{RenewTranslation} that \emph{can} be
+ used after begin document.
+ \command{redefinetranslationfallback}[\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{RenewTranslationFallback} that
+ \emph{can} be used after begin document.
+ \command{addtranslation}[\marg{lang}\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{ProvideTranslation} that \emph{can} be
+ used after begin document.
+ \command{addtranslationfallback}[\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{ProvideTranslationFallback} that
+ \emph{can} be used after begin document.
+ \command{declaretranslation}[\marg{lang}\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{DeclareTranslation} that \emph{can} be
+ used after begin document.
+ \command{declaretranslationfallback}[\marg{key}\marg{translation}]
+ \sinceversion{1.4}A version of \cs{DeclareTranslationFallback} that
+ \emph{can} be used after begin document.
\expandable\command{IfTranslation}[\marg{lang}\marg{key}\marg{true}\marg{false}]
Checks\sinceversion{1.2d} if a translation for \meta{key} in language
\meta{lang} is defined or not and either leaves \meta{true} or
@@ -609,7 +654,7 @@ variation of this theme) please let me know, preferably with a short
explanation what's wrong and why.
\newcounter{column}
-\gdef\seplang{%
+\def\seplang{%
\stepcounter{column}%
\ifnumless{\value{column}}{5}
{&}
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!