texlive[41384] Master/texmf-dist: translations (2jun16)
commits+karl at tug.org
commits+karl at tug.org
Sun Jun 12 01:19:35 CEST 2016
Revision: 41384
http://tug.org/svn/texlive?view=revision&revision=41384
Author: karl
Date: 2016-06-12 01:19:34 +0200 (Sun, 12 Jun 2016)
Log Message:
-----------
translations (2jun16)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/translations/README
trunk/Master/texmf-dist/doc/latex/translations/translations_en.pdf
trunk/Master/texmf-dist/doc/latex/translations/translations_en.tex
trunk/Master/texmf-dist/tex/latex/translations/translations.sty
Modified: trunk/Master/texmf-dist/doc/latex/translations/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/translations/README 2016-06-11 23:19:25 UTC (rev 41383)
+++ trunk/Master/texmf-dist/doc/latex/translations/README 2016-06-11 23:19:34 UTC (rev 41384)
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the TRANSLATIONS package v1.3 - 2016/04/19
+the TRANSLATIONS package v1.4a - 2016/06/02
internationalization of LaTeX2e packages
--------------------------------------------------------------------------
Modified: trunk/Master/texmf-dist/doc/latex/translations/translations_en.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/translations/translations_en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/translations/translations_en.tex 2016-06-11 23:19:25 UTC (rev 41383)
+++ trunk/Master/texmf-dist/doc/latex/translations/translations_en.tex 2016-06-11 23:19:34 UTC (rev 41384)
@@ -47,7 +47,9 @@
DeclareLanguageAlias,
DeclareLanguageDialect,
DeclareTranslation,
+ declaretranslation,
DeclareTranslationFallback,
+ declaretranslationfallback,
GetTranslation,
GetTranslationFor,
IfTranslation,
@@ -54,9 +56,19 @@
LoadDictionary,
LoadDictionaryFor,
NewTranslation,
+ definetranslation,
+ NewTranslationFallback,
+ definetranslationfallback,
ProvideDictionaryFor,
ProvideDictTranslation,
+ ProvideTranslation,
+ addtranslation,
+ ProvideTranslationFallback,
+ addtranslationfallback,
RenewTranslation,
+ redefinetranslation,
+ RenewTranslationFallback,
+ redefinetranslationfallback,
SaveTranslation,
SaveTranslationFor
} ,
@@ -249,16 +261,27 @@
\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}.
@@ -265,10 +288,32 @@
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 @@
explanation what's wrong and why.
\newcounter{column}
-\gdef\seplang{%
+\def\seplang{%
\stepcounter{column}%
\ifnumless{\value{column}}{5}
{&}
Modified: trunk/Master/texmf-dist/tex/latex/translations/translations.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/translations/translations.sty 2016-06-11 23:19:25 UTC (rev 41383)
+++ trunk/Master/texmf-dist/tex/latex/translations/translations.sty 2016-06-11 23:19:34 UTC (rev 41384)
@@ -25,9 +25,9 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\def\@trnslt at date{2016/04/19}
-\def\@trnslt at version{v1.3}
-\def\@trnslt at info{internationalization of LaTeX2e packages}
+\newcommand*\@trnslt at date{2016/06/02}
+\newcommand*\@trnslt at version{v1.4a}
+\newcommand*\@trnslt at info{internationalization of LaTeX2e packages}
\ProvidesPackage{translations}[%
\@trnslt at date\space
@@ -38,7 +38,7 @@
% --------------------------------------------------------------------------
% message handling
% generic help message:
-\def\@trnslt at error@message{%
+\newcommand*\@trnslt at 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 at declare@translation{#2}{#1}{#3}%
}
-\@onlypreamble\DeclareTranslation
-
-\newrobustcmd*\DeclareTranslationFallback[2]{%
- \@trnslt at declare@translation{#1}{fallback}{#2}%
-}
-\@onlypreamble\DeclareTranslationFallback
-
-\newrobustcmd*\NewTranslation[3]{%
+\newrobustcmd*\definetranslation[3]{%
\@trnslt at new@translation{#2}{#1}{#3}%
}
-\@onlypreamble\NewTranslation
-
-\newrobustcmd*\RenewTranslation[3]{%
+\newrobustcmd*\redefinetranslation[3]{%
\@trnslt at renew@translation{#2}{#1}{#3}%
}
-\@onlypreamble\RenewTranslation
-
-\newrobustcmd*\ProvideTranslation[3]{%
+\newrobustcmd*\addtranslation[3]{%
\@trnslt at 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 at print@dictionary at 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,7 +1124,7 @@
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
@@ -1112,3 +1131,9 @@
- 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!
More information about the tex-live-commits
mailing list