summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/translations
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-04-27 03:03:41 +0000
committerNorbert Preining <norbert@preining.info>2020-04-27 03:03:41 +0000
commitae496a1c963576dfe63885afa818b2af745ed44a (patch)
tree62604706ca603c17f5f56fe646072d8d2cfab60c /macros/latex/contrib/translations
parent7d9d2e08fcab92adcc759e3f1e4bb0a15a63f220 (diff)
CTAN sync 202004270303
Diffstat (limited to 'macros/latex/contrib/translations')
-rw-r--r--macros/latex/contrib/translations/README2
-rw-r--r--macros/latex/contrib/translations/translations.sty81
-rw-r--r--macros/latex/contrib/translations/translations_en.pdfbin496892 -> 500141 bytes
3 files changed, 45 insertions, 38 deletions
diff --git a/macros/latex/contrib/translations/README b/macros/latex/contrib/translations/README
index a944202cc2..d403194378 100644
--- a/macros/latex/contrib/translations/README
+++ b/macros/latex/contrib/translations/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the TRANSLATIONS package v1.8 - 2020/02/28
+the TRANSLATIONS package v1.8a - 2020/04/26
internationalization of LaTeX2e packages
--------------------------------------------------------------------------
diff --git a/macros/latex/contrib/translations/translations.sty b/macros/latex/contrib/translations/translations.sty
index 5875db674b..d013842825 100644
--- a/macros/latex/contrib/translations/translations.sty
+++ b/macros/latex/contrib/translations/translations.sty
@@ -25,8 +25,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\newcommand*\@trnslt@date{2018/02/28}
-\newcommand*\@trnslt@version{v1.8}
+\newcommand*\@trnslt@date{2020/04/26}
+\newcommand*\@trnslt@version{v1.8a}
\newcommand*\@trnslt@packageinfo{internationalization of LaTeX2e packages}
\ProvidesPackage{translations}[%
@@ -557,52 +557,38 @@
\@trnslt@load@dictionary@for@dialect{#2}{#1}}
\@onlypreamble\LoadDictionaryFor
-% #1: name
-% #2: lang
-% #3: false
-\newrobustcmd*\@trnslt@input@if@dictionary@exists[3]{%
- \AtBeginDocument{%
- \InputIfFileExists{#1-\@trnslt@language{#2}.trsl}
- {\@trnslt@check@dictionary{#1}{#2}}
- {#3}%
- }%
+\newcommand*\@trnslt@dictionaries{}
+
+\edef\@trnslt@catcodes{%
+ \catcode\number`\<=\the\catcode`\<\relax
+ \catcode\number`\>=\the\catcode`\>\relax
+ \catcode\number`\|=\the\catcode`\|\relax
}
+\catcode`\<=3
+\catcode`\>=3
+\catcode`\|=7
+
% #1: name
% #2: lang
% #3: false
-\newrobustcmd*\@trnslt@load@dictionary@for@F[3]{%
- \@trnslt@input@if@dictionary@exists{#1}{#2}{#3}%
+\newrobustcmd*\@trnslt@input@if@dictionary[2]{%
+ \expanded{\ifinlist{<#1|\@trnslt@language{#2}>}}{\@trnslt@dictionaries}
+ {}
+ {\listxadd\@trnslt@dictionaries{<#1|\@trnslt@language{#2}>}}%
}
% #1: name
% #2: lang
-\newrobustcmd*\@trnslt@load@dictionary@for@dialect[2]{%
- \@trnslt@load@dictionary@for@F{#1}{#2}
- {%
- \@trnslt@warning{dictionary file `#1-\@trnslt@language{#2}.trsl' not
- found.}%
- }%
+% #3: false
+\newrobustcmd*\@trnslt@load@dictionary@for[2]{%
+ \@trnslt@input@if@dictionary{#1}{#2}%
}
% #1: name
% #2: lang
-\newrobustcmd*\@trnslt@load@dictionary@for[2]{%
- \@trnslt@load@dictionary@for@F{#1}{#2}
- {%
- \@trnslt@load@dictionary@for@F{#1}{\baselanguage{#2}}
- {%
- \@trnslt@warning{neither dictionary file
- `#1-\@trnslt@language{#2}.trsl' nor `#1-\baselanguage{#2}.trsl'
- found.}%
- }%
- }%
-}
-
-\newrobustcmd*\@trnslt@load@dictionary@silent@for[2]{%
- \@trnslt@load@dictionary@for@F{#1}{#2}{%
- \@trnslt@load@dictionary@for@F{#1}{\baselanguage{#2}}{}%
- }%
+\newrobustcmd*\@trnslt@load@dictionary@for@dialect[2]{%
+ \@trnslt@load@dictionary@for{#1}{#2}
}
% #1: name
@@ -620,6 +606,22 @@
}%
}
+\protected\def\@trnslt@input@dictionary<#1|#2>\q@stop{%
+ \InputIfFileExists{#1-#2.trsl}
+ {\@trnslt@check@dictionary{#1}{#2}}
+ {%
+ \@trnslt@if@dialect{#2}
+ {%
+ \InputIfFileExists{#1-\baselanguage{#2}.trsl}
+ {\@trnslt@check@dictionary{#1}{#2}}
+ {\@trnslt@info{no dictionary file `#1-\baselanguage{#2}.trsl' found.}}
+ }%
+ {\@trnslt@info{no dictionary file `#1-#2.trsl' found.}}
+ }%
+}
+
+\@trnslt@catcodes
+
% --------------------------------------------------------------------------
% the contents of a dictionary; let's declare that is one.
% #1: lang
@@ -662,7 +664,7 @@
@trnslt@dictionary@\@trnslt@dictionary@name
@\@trnslt@dictionary@lang @{#1}{\detokenize{#2}}%
}{{#1}{#2}}%
- \listcsadd
+ \listcsgadd
{@trnslt@dictionary@\@trnslt@dictionary@name @\@trnslt@dictionary@lang}
{{#1}{#2}}%
}
@@ -1076,9 +1078,12 @@
\fi
\expanded{%
\noexpand\forcsvlist
- {\noexpand\@trnslt@load@dictionary@silent@for{translations-basic-dictionary}}
+ {\noexpand\@trnslt@load@dictionary@for{translations-basic-dictionary}}
{\expandonce\@trnslt@loaded@languages}%
}%
+ \def\do#1{\@trnslt@input@dictionary#1\q@stop}
+ \dolistloop\@trnslt@dictionaries
+ \let\do\@gobble
}
\endinput
@@ -1174,3 +1179,5 @@
2017/08/31 v1.7a - add missing dependency on pdftexcmds
2020/02/28 v1.8 - load basic dictionary for each loaded language (if
available)
+2020/04/26 v1.8a - fix problem with loading of dictionaries in some
+ circumstances
diff --git a/macros/latex/contrib/translations/translations_en.pdf b/macros/latex/contrib/translations/translations_en.pdf
index 7087da4bdc..27d71b446a 100644
--- a/macros/latex/contrib/translations/translations_en.pdf
+++ b/macros/latex/contrib/translations/translations_en.pdf
Binary files differ