summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/translations
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-01 01:34:26 +0000
committerKarl Berry <karl@freefriends.org>2017-09-01 01:34:26 +0000
commit45505da7208c4dee5f73974e6f3143c658edfdd0 (patch)
treea3de6b2e6c5ffdff1b325bc947018c0d67468ee6 /Master/texmf-dist/tex/latex/translations
parentf9715c01ae9898fd648e3d67240582a87c9274ff (diff)
translations (31aug17)
git-svn-id: svn://tug.org/texlive/trunk@45189 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/translations')
-rw-r--r--Master/texmf-dist/tex/latex/translations/translations.sty40
1 files changed, 23 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/translations/translations.sty b/Master/texmf-dist/tex/latex/translations/translations.sty
index 88d2b20c86f..6c5e03bbf28 100644
--- a/Master/texmf-dist/tex/latex/translations/translations.sty
+++ b/Master/texmf-dist/tex/latex/translations/translations.sty
@@ -25,15 +25,15 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\newcommand*\@trnslt@date{2017/05/16}
-\newcommand*\@trnslt@version{v1.6}
+\newcommand*\@trnslt@date{2017/08/31}
+\newcommand*\@trnslt@version{v1.7a}
\newcommand*\@trnslt@packageinfo{internationalization of LaTeX2e packages}
\ProvidesPackage{translations}[%
\@trnslt@date\space
\@trnslt@version\space
\@trnslt@packageinfo\space (CN)]
-\RequirePackage{scrlfile,etoolbox}
+\RequirePackage{scrlfile,etoolbox,pdftexcmds}
% --------------------------------------------------------------------------
% message handling
@@ -462,11 +462,11 @@
\newcommand*\@trnslt@get@translation@for[2]{%
\@trnslt@if@dialect{#2}
{%
- \ifcsdef{@trnslt@word@\detokenize{#1}@\@trnslt@dialect{#2}}
- {\csuse{@trnslt@word@\detokenize{#1}@\@trnslt@dialect{#2}}}
- {\csuse{@trnslt@word@\detokenize{#1}@\@trnslt@dialect@of{#2}}}%
+ \@trnslt@if@translation@value{#1}{\@trnslt@dialect{#2}}
+ {\@trnslt@translation@value{#1}{\@trnslt@dialect{#2}}}
+ {\@trnslt@translation@value{#1}{\@trnslt@dialect@of{#2}}}%
}
- {\csuse{@trnslt@word@\detokenize{#1}@\@trnslt@language{#2}}}%
+ {\@trnslt@translation@value{#1}{\@trnslt@language{#2}}}%
}
\newcommand*\@trnslt@checkandget@translation@for[2]{%
@@ -474,11 +474,21 @@
{\@trnslt@get@translation@for{#1}{#2}}
{%
\@trnslt@if@translation{#1}{fallback}
- {\csuse{@trnslt@word@\detokenize{#1}@fallback}}
- {\csuse{@trnslt@word@\detokenize{#1}@literal}}%
+ {\@trnslt@translation@value{#1}{fallback}}
+ {\@trnslt@translation@value{#1}{literal}}%
}%
}
+\newcommand*\@trnslt@if@translation@value[2]{%
+ \ifcsdef{@trnslt@word@\detokenize{#1}@#2}%
+}
+
+\newcommand*\@trnslt@translation@value[2]{%
+ \unexpanded\expandafter\expandafter\expandafter{%
+ \csname @trnslt@word@\detokenize{#1}@#2\endcsname
+ }%
+}
+
% this is not expandable!
\newrobustcmd*\@trnslt@getandwarn@translation@for[2]{%
\@trnslt@if@translation{#1}{#2}
@@ -524,14 +534,7 @@
}
\newrobustcmd*\@trnslt@save@translation@for[3]{%
- \edef#1{%
- \@trnslt@if@translation{#2}{#3}
- {%
- \unexpanded\expandafter\expandafter\expandafter
- {\csname @trnslt@word@\detokenize{#2}@\@trnslt@language{#3}\endcsname}%
- }
- {}%
- }%
+ \edef#1{\@trnslt@checkandget@translation@for{#2}{#3}}%
}
% --------------------------------------------------------------------------
@@ -1152,3 +1155,6 @@
2017/05/06 v1.5c - add Azerbaijani
2017/05/16 v1.6 - allow translations to contain \par
- improve perfomance by replacing list checks
+2017/07/03 v1.6a - fix issue #6 (bug in \@trnslt@save@translation@for)
+2017/07/06 v1.7 - return translation values in \unexpanded
+2017/08/31 v1.7a - add missing dependency on pdftexcmds