texlive[44381] Master/texmf-dist: translations (16may17)

commits+karl at tug.org commits+karl at tug.org
Tue May 16 23:07:08 CEST 2017


Revision: 44381
          http://tug.org/svn/texlive?view=revision&revision=44381
Author:   karl
Date:     2017-05-16 23:07:07 +0200 (Tue, 16 May 2017)
Log Message:
-----------
translations (16may17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/translations/README
    trunk/Master/texmf-dist/doc/latex/translations/translations_en.pdf
    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	2017-05-16 21:06:34 UTC (rev 44380)
+++ trunk/Master/texmf-dist/doc/latex/translations/README	2017-05-16 21:07:07 UTC (rev 44381)
@@ -1,5 +1,5 @@
 --------------------------------------------------------------------------
-the TRANSLATIONS package v1.5c - 2017/05/06
+the TRANSLATIONS package v1.6 - 2017/05/16
   internationalization of LaTeX2e packages
 
 --------------------------------------------------------------------------

Modified: trunk/Master/texmf-dist/doc/latex/translations/translations_en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/translations/translations.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/translations/translations.sty	2017-05-16 21:06:34 UTC (rev 44380)
+++ trunk/Master/texmf-dist/tex/latex/translations/translations.sty	2017-05-16 21:07:07 UTC (rev 44381)
@@ -25,8 +25,8 @@
 % If you have any ideas, questions, suggestions or bugs to report, please
 % feel free to contact me.
 % --------------------------------------------------------------------------
-\newcommand*\@trnslt at date{2017/05/06}
-\newcommand*\@trnslt at version{v1.5c}
+\newcommand*\@trnslt at date{2017/05/16}
+\newcommand*\@trnslt at version{v1.6}
 \newcommand*\@trnslt at packageinfo{internationalization of LaTeX2e packages}
 
 \ProvidesPackage{translations}[%
@@ -94,23 +94,6 @@
   \fi
 }
 
-% a check for etoolbox's lists where items may contain braces:
-\newbool{@trnslt at inlist}
-\newrobustcmd\@trnslt at ifinlist@type[5]{%
-  \def\do##1{%
-    \boolfalse{@trnslt at inlist}%
-    \ifstrequal{##1}{#2}
-      {\booltrue{@trnslt at inlist}\listbreak}
-      {}%
-  }%
-  #1{#3}%
-  \ifbool{@trnslt at inlist}
-    {#4}
-    {#5}%
-}
-\newrobustcmd*\@trnslt at ifinlist{\@trnslt at ifinlist@type\dolistloop}
-\newrobustcmd*\@trnslt at ifinlistcs{\@trnslt at ifinlist@type\dolistcsloop}
-
 \long\def\@trnslt at getnext@braced#1#2#3{#2\@trnslt at firstofone{#3{#1}}}
 \long\def\@trnslt at firstofone#1{#1}
 \long\def\@trnslt at braced@expanded at fully#1\@trnslt at firstofone#2#3{%
@@ -252,11 +235,12 @@
   \@trnslt at if@dialect{#2}
     {\csletcs{@trnslt at dialect@#1}{@trnslt at dialect@#2}}
     {}%
-  \@trnslt at ifinlist{#1}\@trnslt at aliases@single
-    {}{%
+  \ifcsdef{@trnslt at alias@#1}
+    {}
+    {%
       \csdef{@trnslt at alias@#1}{#2}%
-      \listeadd\@trnslt at aliases@pair{{#1}{#2}}%
-      \listeadd\@trnslt at aliases@single{#1}%
+      \listadd\@trnslt at aliases@pair{{#1}{#2}}%
+      \listadd\@trnslt at aliases@single{#1}%
     }%
 }
 
@@ -311,16 +295,16 @@
 % #1: language
 % #2: word
 % #3: replacement
-\newrobustcmd*\declaretranslation[3]{%
+\newrobustcmd\declaretranslation[3]{%
   \@trnslt at declare@translation{#2}{#1}{#3}%
 }
-\newrobustcmd*\definetranslation[3]{%
+\newrobustcmd\definetranslation[3]{%
   \@trnslt at new@translation{#2}{#1}{#3}%
 }
-\newrobustcmd*\redefinetranslation[3]{%
+\newrobustcmd\redefinetranslation[3]{%
   \@trnslt at renew@translation{#2}{#1}{#3}%
 }
-\newrobustcmd*\addtranslation[3]{%
+\newrobustcmd\addtranslation[3]{%
   \@trnslt at provide@translation{#2}{#1}{#3}%
 }
 
@@ -358,17 +342,17 @@
 % #1: word
 % #2: language
 % #3: replacement
-\newrobustcmd*\@trnslt at declare@translation[3]{%
+\newrobustcmd\@trnslt at declare@translation[3]{%
   \@trnslt at if@language{#2}
     {%
       \@trnslt at if@dialect{#2}
         {%
-          \csdef{@trnslt at word@\detokenize{#1}@\@trnslt at dialect{#2}}{#3}%
+          \long\csdef{@trnslt at word@\detokenize{#1}@\@trnslt at dialect{#2}}{#3}%
           \@trnslt at if@word\@trnslt at dialect@of{#1}{#2}
             {}
-            {\csdef{@trnslt at word@\detokenize{#1}@\@trnslt at dialect@of{#2}}{#3}}%
+            {\long\csdef{@trnslt at word@\detokenize{#1}@\@trnslt at dialect@of{#2}}{#3}}%
         }
-        {\csdef{@trnslt at word@\detokenize{#1}@\@trnslt at language{#2}}{#3}}%
+        {\long\csdef{@trnslt at word@\detokenize{#1}@\@trnslt at language{#2}}{#3}}%
       % save the <word> as <word>:
       \csdef{@trnslt at word@\detokenize{#1}@literal}{#1}%
     }
@@ -375,19 +359,19 @@
     {\@trnslt at err@unknown at lang{#2}}%
 }
 
-\newrobustcmd*\@trnslt at new@translation[3]{%
+\newrobustcmd\@trnslt at new@translation[3]{%
   \@trnslt at if@word\@trnslt at language{#1}{#2}
     {\@trnslt at err@already at defined{#1}{#2}}
     {\@trnslt at declare@translation{#1}{#2}{#3}}%
 }
 
-\newrobustcmd*\@trnslt at renew@translation[3]{%
+\newrobustcmd\@trnslt at renew@translation[3]{%
   \@trnslt at if@word\@trnslt at language{#1}{#2}
     {\@trnslt at declare@translation{#1}{#2}{#3}}
     {\@trnslt at err@not at defined{#1}{#2}}%
 }
 
-\newrobustcmd*\@trnslt at provide@translation[3]{%
+\newrobustcmd\@trnslt at provide@translation[3]{%
   \@trnslt at if@word\@trnslt at language{#1}{#2}
     {}
     {\@trnslt at declare@translation{#1}{#2}{#3}}%
@@ -661,14 +645,18 @@
     {\@trnslt at dictionary@name-\@trnslt at dictionary@lang.trsl}%
     [(\@trnslt at dictionary@lang\space translation file `\@trnslt at dictionary@name') #1]}
 
-% change this test (we can't use braces inside the item with \ifinlist):
 \newcommand*\@trnslt at check@dictionary at entry[2]{%
-  \@trnslt at ifinlistcs
-    {{#1}{#2}}
-    {@trnslt at dictionary@\@trnslt at dictionary@name @\@trnslt at dictionary@lang}%
+  \ifcsdef{%
+    @trnslt at dictionary@\@trnslt at dictionary@name
+    @\@trnslt at dictionary@lang @{#1}{\detokenize{#2}}%
+  }%
 }
 
 \newrobustcmd*\@trnslt at add@dictionary at entry[2]{%
+  \csdef{%
+    @trnslt at dictionary@\@trnslt at dictionary@name
+    @\@trnslt at dictionary@lang @{#1}{\detokenize{#2}}%
+  }{{#1}{#2}}%
   \listcsadd
     {@trnslt at dictionary@\@trnslt at dictionary@name @\@trnslt at dictionary@lang}
     {{#1}{#2}}%
@@ -1162,3 +1150,5 @@
 2017/03/05 v1.5a    - correct typos in Dutch dictionary
 2017/04/24 v1.5b    - correct typos in Malaysian language names
 2017/05/06 v1.5c    - add Azerbaijani
+2017/05/16 v1.6     - allow translations to contain \par
+                    - improve perfomance by replacing list checks



More information about the tex-live-commits mailing list