Skip to content

Commit

Permalink
v0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
cgnieder committed Feb 28, 2020
1 parent 87428e2 commit cabbd97
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 41 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
the TRANSLATIONS package v1.8 - 2020/02/27
the TRANSLATIONS package v1.8 - 2020/02/28
internationalization of LaTeX2e packages

--------------------------------------------------------------------------
Expand Down
53 changes: 28 additions & 25 deletions translations.sty
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
\newcommand*\@trnslt@date{2018/02/27}
\newcommand*\@trnslt@date{2018/02/28}
\newcommand*\@trnslt@version{v1.8}
\newcommand*\@trnslt@packageinfo{internationalization of LaTeX2e packages}

Expand Down Expand Up @@ -143,7 +143,9 @@
\@trnslt@if@language{#1}
{}{%
\csdef{@trnslt@language@#1}{#1}%
\listeadd\@trnslt@languages{#1}%
\@trnslt@if@dialect{#1}
{}
{\listeadd\@trnslt@languages{#1}}%
}%
}

Expand Down Expand Up @@ -838,6 +840,29 @@
\DeclareLanguage{vietnamese}
\DeclareLanguage{welsh}

\DeclareLanguageDialect{british}{english}
\DeclareLanguageDialect{australian}{english}
\DeclareLanguageDialect{american}{english}
\DeclareLanguageDialect{acadian}{french}
\DeclareLanguageDialect{canadien}{french}
\DeclareLanguageDialect{canadian}{english}
\DeclareLanguageDialect{newzealand}{english}
\DeclareLanguageDialect{irish}{gaelic}
\DeclareLanguageDialect{scottish}{gaelic}
\DeclareLanguageDialect{austrian}{german}
\DeclareLanguageDialect{hindi}{hindustani}
\DeclareLanguageDialect{urdu}{hindustani}
\DeclareLanguageDialect{indonesian}{malay}
\DeclareLanguageDialect{brazil}{portuges}
\DeclareLanguageDialect{serbian}{serbocroatian}
\DeclareLanguageDialect{croatian}{serbocroatian}
\DeclareLanguageDialect{lowersorbian}{sorbian}
\DeclareLanguageDialect{uppersorbian}{sorbian}
\DeclareLanguageDialect{swissgerman}{german}
\DeclareLanguageDialect{swissfrench}{french}
\DeclareLanguageDialect{swissitalian}{italian}
\DeclareLanguageDialect{swissromansh}{romansh}

% --------------------------------------------------------------------------
% aliases and dialects:
\DeclareLanguageAlias {Afrikaans}{afrikaans}
Expand Down Expand Up @@ -866,32 +891,23 @@
\DeclareLanguageAlias {Finnish}{finnish}
\DeclareLanguageAlias {francais}{french}
\DeclareLanguageAlias {Francais}{francais}
\DeclareLanguageDialect{canadien}{french}
\DeclareLanguageAlias {Canadien}{canadien}
\DeclareLanguageAlias {French}{french}
\DeclareLanguageDialect{acadian}{french}
\DeclareLanguageAlias {Acadian}{acadian}
\DeclareLanguageAlias {frenchle}{french}
\DeclareLanguageDialect{american}{english}
\DeclareLanguageAlias {American}{american}
\DeclareLanguageDialect{australian}{english}
\DeclareLanguageAlias {Australian}{australian}
\DeclareLanguageDialect{british}{english}
\DeclareLanguageAlias {British}{british}
\DeclareLanguageDialect{canadian}{english}
\DeclareLanguageAlias {Canadian}{canadian}
\DeclareLanguageAlias {English}{english}
\DeclareLanguageAlias {UKenglish}{british}
\DeclareLanguageAlias {USenglish}{american}
\DeclareLanguageDialect{newzealand}{english}
\DeclareLanguageAlias {Newzealand}{newzealand}
\DeclareLanguageAlias {Ethiop}{ethiop}
\DeclareLanguageAlias {Esperanto}{esperanto}
\DeclareLanguageAlias {Estonian}{estonian}
\DeclareLanguageAlias {Friulan}{friulan}
\DeclareLanguageAlias {Gaelic}{gaelic}
\DeclareLanguageDialect{irish}{gaelic}
\DeclareLanguageDialect{scottish}{gaelic}
\DeclareLanguageAlias {Irish}{irish}
\DeclareLanguageAlias {irish gaelic}{irish}
\DeclareLanguageAlias {Irish Gaelic}{irish}
Expand All @@ -902,7 +918,6 @@
\DeclareLanguageAlias {German}{german}
\DeclareLanguageAlias {germanb}{german}
\DeclareLanguageAlias {ngerman}{german}
\DeclareLanguageDialect{austrian}{german}
\DeclareLanguageAlias {Austrian}{austrian}
\DeclareLanguageAlias {naustrian}{austrian}
\DeclareLanguageAlias {Greek}{greek}
Expand All @@ -913,9 +928,7 @@
\DeclareLanguageAlias {Hindustani}{hindustani}
\DeclareLanguageAlias {hindi-urdu}{hindustani}
\DeclareLanguageAlias {Hindi-Urdu}{hindi-urdu}
\DeclareLanguageDialect{hindi}{hindustani}
\DeclareLanguageAlias {Hindi}{hindi}
\DeclareLanguageDialect{urdu}{hindustani}
\DeclareLanguageAlias {Urdu}{urdu}
\DeclareLanguageAlias {Hungarian}{hungarian}
\DeclareLanguageAlias {magyar}{hungarian}
Expand Down Expand Up @@ -949,7 +962,6 @@
\DeclareLanguageAlias {Bahasai}{bahasai}
\DeclareLanguageAlias {bahasam}{bahasa}
\DeclareLanguageAlias {Bahasam}{bahasam}
\DeclareLanguageDialect{indonesian}{malay}
\DeclareLanguageAlias {Indonesian}{indonesian}
\DeclareLanguageAlias {indon}{indonesian}
%
Expand All @@ -975,7 +987,6 @@
\DeclareLanguageAlias {Piemonteis}{piemonteis}
\DeclareLanguageAlias {Pinyin}{pinyin}
\DeclareLanguageAlias {Polish}{polish}
\DeclareLanguageDialect{brazil}{portuges}
\DeclareLanguageAlias {Brazil}{brazil}
\DeclareLanguageAlias {brazilian}{brazil}
\DeclareLanguageAlias {Brazilian}{brazilian}
Expand All @@ -998,18 +1009,14 @@
\DeclareLanguageAlias {Serbocroatian}{serbocroatian}
\DeclareLanguageAlias {serbo-croatian}{serbocroatian}
\DeclareLanguageAlias {Serbo-Croatian}{serbocroatian}
\DeclareLanguageDialect{serbian}{serbocroatian}
\DeclareLanguageAlias {Serbian}{serbian}
\DeclareLanguageAlias {serbianc}{serbian}
\DeclareLanguageDialect{croatian}{serbocroatian}
\DeclareLanguageAlias {Croatian}{croatian}
\DeclareLanguageAlias {Slovak}{slovak}
\DeclareLanguageAlias {Slovenian}{slovenian}
\DeclareLanguageAlias {slovene}{slovenian}
\DeclareLanguageAlias {Slovene}{slovene}
\DeclareLanguageAlias {Sorbian}{sorbian}
\DeclareLanguageDialect{lowersorbian}{sorbian}
\DeclareLanguageDialect{uppersorbian}{sorbian}
\DeclareLanguageAlias {Lowersorbian}{lowersorbian}
\DeclareLanguageAlias {Uppersorbian}{uppersorbian}
\DeclareLanguageAlias {lsorbian}{lowersorbian}
Expand All @@ -1023,10 +1030,6 @@
\DeclareLanguageAlias {Spanglish}{spanglish}
\DeclareLanguageAlias {Spanish}{spanish}
\DeclareLanguageAlias {Swedish}{swedish}
\DeclareLanguageDialect{swissgerman}{german}
\DeclareLanguageDialect{swissfrench}{french}
\DeclareLanguageDialect{swissitalian}{italian}
\DeclareLanguageDialect{swissromansh}{romansh}
\DeclareLanguageAlias {Swissgerman}{swissgerman}
\DeclareLanguageAlias {swiss german}{swissgerman}
\DeclareLanguageAlias {Swiss German}{swissgerman}
Expand Down Expand Up @@ -1169,5 +1172,5 @@
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
2020/02/27 v1.8 - load basic dictionary for each loaded language (if
2020/02/28 v1.8 - load basic dictionary for each loaded language (if
available)
Binary file modified translations_en.pdf
Binary file not shown.
43 changes: 28 additions & 15 deletions translations_en.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% !arara: pdflatex: { shell: on }
% arara: pdflatex: { shell: on, interaction: nonstopmode }
% !arara: biber
% arara: pdflatex
% arara: pdflatex
% !arara: pdflatex
% !arara: pdflatex
% --------------------------------------------------------------------------
% the TRANSLATIONS package
%
Expand Down Expand Up @@ -31,8 +31,10 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
\documentclass[load-preamble+,french,spanish,ngerman,english]{cnltx-doc}
\documentclass[load-preamble]{cnltx-doc}
\usepackage[french,spanish,ngerman,english]{babel}
% ----------------------------------------------------------------------------
\usepackage{imakeidx}
% document layout and typographic features
\setcnltx{
package = {translations} ,
Expand Down Expand Up @@ -81,13 +83,19 @@

\microtypesetup{tracking=scshape}

\defbibheading{bibliography}[\bibname]{\addsec{#1}}

\usepackage[
backend=biber,
style=cnltx,
sortlocale=en_US,
indexing=cite]{biblatex}
\usepackage{csquotes}
\addbibresource{cnltx.bib}

\usepackage[biblatex]{embrac}
\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]

\usepackage{embrac}[2012/06/29]
\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
\defbibheading{bibliography}{\section{References}}

% ----------------------------------------------------------------------------
% other packages, bibliography, index
Expand Down Expand Up @@ -420,7 +428,7 @@ \subsection{Available Commands}\label{ssec:commands}
\meta{false} if the current \pkg{babel} language is \code{american}.
\expandable\command{ifcurrentbaselanguage}[\marg{lang}\marg{true}\marg{false}]
\sinceversion{1.2}Places \meta{true} in the input stream if the current
language is \meta{lang}. Note: a dialect does notcount as a language of
language is \meta{lang}. Note: a dialect does not count as a language of
it's own here. If the current \pkg{babel} language is \code{american}
then \cs{ifcurrentbaselanguage}\Marg{English} will be \meta{true}.
\end{commands}
Expand Down Expand Up @@ -488,7 +496,7 @@ \subsubsection{The `fallback' language}
chosen a language for which no translation is defined the language `fallback'
will be used, \ie, the translation provided with
\cs{DeclareTranslationFallback}. If no fallback translation is provided
either the translation will expand to the literal string.
either, the translation will expand to the literal string.

The following three examples should make this concept clear:

Expand Down Expand Up @@ -618,10 +626,13 @@ \subsubsection{\translations' Basic Dictionaries}\label{sec:transl-basic-dict}
\item German, and
\item Spanish.
\end{itemize}
The corresponding dictionary is loaded automatically if the document language
is one of these languages. If you'd like to contribute and add the basic
dictionary in your language this is more than welcome and highly appreciated!
The easiest way to do this would be to copy one of the existing files
The corresponding dictionary\footnote{Or dictionaries if more than one of
these languages are loaded in a document. This works since v0.18.} is loaded
automatically if the document language is one of these languages.

\emph{If you'd like to contribute and add the basic dictionary in your
language this is more than welcome and highly appreciated!} The easiest way
to do this would be to copy one of the existing files
\code{translations-basic-dictionary-\meta{lang}.trsl} and modify the file
accordingly. You can then send me the file via email and I'll add it to
\translations.
Expand Down Expand Up @@ -775,4 +786,6 @@ \subsection{Language Aliases}\label{ssec:languages:aliases}
% \section{Implementation}
% \lstinputlisting[style=cnltx]{translations.sty}

\printbibliography

\end{document}

0 comments on commit cabbd97

Please sign in to comment.