texlive[51574] Master/texmf-dist: changelog (7jul19)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 7 22:21:16 CEST 2019


Revision: 51574
          http://tug.org/svn/texlive?view=revision&revision=51574
Author:   karl
Date:     2019-07-07 22:21:15 +0200 (Sun, 07 Jul 2019)
Log Message:
-----------
changelog (7jul19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/changelog/changelog.pdf
    trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex
    trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty

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

Modified: trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex	2019-07-07 20:21:04 UTC (rev 51573)
+++ trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex	2019-07-07 20:21:15 UTC (rev 51574)
@@ -1,4 +1,11 @@
 \documentclass{ltxguidex}
+% for demonstrating translations
+\usepackage[german, american]{babel}
+%\babelprovide{chinese}
+%\usepackage{translations}
+%\DeclareLanguage{Chinese}
+%\DeclareTranslation{Chinese}{changelog-added}{新增}
+
 \usepackage{fontspec}
 \errorcontextlines=10
 \usepackage{changelog}
@@ -6,20 +13,7 @@
 \newcommand{\cl}{\ctan{changelog}}
 \newcommand{\keepachangelog}{\https{keepachangelog.com}}
 
-% a list of colors; use \color{colorname}
 \makeatletter
-\newenvironment{colorlist}
-	{\begin{itemize}
-		\let\old at item\item
-		\renewcommand{\item}[1]{%
-			\old at item[\fcolorbox{black}{##1}{\vphantom{X}\hspace{1em}}]
-			\texttt{##1}
-		}
-	}
-	{\end{itemize}}
-\makeatother
-
-\makeatletter
 \renewcommand{\SX at explpreset}{
 	language=[LaTeX]TeX,
 	numbers=none,
@@ -39,7 +33,7 @@
 
 \author{Rebecca Turner\thanks{Brandeis University; \email{rebeccaturner at brandeis.edu}}}
 \title{The \cl\ Package}
-\date{2019/04/15 2.0.0}
+\date{2019/07/06 2.1.0}
 \begin{document}
 \maketitle
 
@@ -259,11 +253,78 @@
 \href{https://keepachangelog.com/en/1.0.0/#yanked}{yanked releases on
 \texttt{keepachangelog.com}}.
 
+\section{Translations}
+
+Want to use \cl\ in a non-English document? Great! Thanks to a contribution
+by Holger Schieferdecker (see section~\ref{s:contrib} below), \cl\ comes
+with translations for English, German, and support for adding new
+translations. To use built-in translations, simply load \ctan{babel} with
+the desired language:
+\begin{otherlanguage}{german}
+\begin{LTXexample}
+% In the preamble:
+% \usepackage[german]{babel}
+
+\begin{changelog}[section=false, author=Holger Schieferdecker]
+  \begin{version}[v=1.0.0]
+    \added
+      \item Features!
+  \end{version}
+\end{changelog}
+\end{LTXexample}
+\end{otherlanguage}
+
+\subsection{Creating new translations}
+
+\cl\ uses the \ctan{translations} package to provide translations, and a
+complete translation looks like this:
+\begin{latexcode}
+\documentclass{article}
+\usepackage[english]{babel}
+\usepackage{translations}
+\DeclareTranslation{English}{changelog-Added}{Added}
+\DeclareTranslation{English}{changelog-Changed}{Changed}
+\DeclareTranslation{English}{changelog-Deprecated}{Deprecated}
+\DeclareTranslation{English}{changelog-Removed}{Removed}
+\DeclareTranslation{English}{changelog-Fixed}{Fixed}
+\DeclareTranslation{English}{changelog-Security}{Security}
+\DeclareTranslation{English}{changelog-Miscellaneous}{Miscellaneous}
+\DeclareTranslation{English}{changelog-Unreleased}{Unreleased}
+\DeclareTranslation{English}{changelog-Yanked}{YANKED}
+\begin{document}
+% ...
+\end{document}
+\end{latexcode}
+Refer to the
+\href{http://mirrors.ctan.org/macros/latex/contrib/translations/translations_en.pdf}{\texttt{translations}
+package documentation} and the
+\href{http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf}{\texttt{babel}
+package documentation} for more information.
+
+If you create a translation, please \href{mailto:637275 at gmail.com}{send me
+an email} and I'll incorporate the translation into \cl's next release!
+
+\section{Contributors}%
+\label{s:contrib}
+
+\begin{description}
+	\item[Rebecca Turner] Original implementation.
+	\item[Holger Schieferdecker]
+	Internationalization support and German translations.
+\end{description}
+
 \section{Changelog}
 
 This is this package's actual changelog --- not an example!
 
 \begin{changelog}[author=Rebecca Turner, section=false]
+\begin{version}[v=2.1.0, date=2019-06-29,
+	author={Holger Schieferdecker}]
+\added
+	\item Internationalization support.
+	\item German translations.
+\end{version}
+
 \begin{version}[v=2.0.0, date=2019-04-15]
 \added
 	\item Better error handling; more informative messages for empty

Modified: trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty	2019-07-07 20:21:04 UTC (rev 51573)
+++ trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty	2019-07-07 20:21:15 UTC (rev 51574)
@@ -1,4 +1,4 @@
-\ProvidesPackage{changelog}[2019/04/15 2.0.0 Typesetting changelogs]
+\ProvidesPackage{changelog}[2019/07/06 2.1.0 Typesetting changelogs]
 % Description: Provides the changelog environment for typesetting changelogs
 % License:     LPPL 1.3c
 % Homepage:    https://github.com/9999years/latex-changelog
@@ -21,7 +21,44 @@
 
 \RequirePackage{xparse}
 \RequirePackage{xkeyval}
+\RequirePackage{translations}
 
+% See https://github.com/olivierlacan/keep-a-changelog/issues/195
+% for a discussion about the term yanked
+
+% Fallback translations will be used if there is no translation for
+% the current document language
+\DeclareTranslationFallback{changelog-Added}{Added}
+\DeclareTranslationFallback{changelog-Changed}{Changed}
+\DeclareTranslationFallback{changelog-Deprecated}{Deprecated}
+\DeclareTranslationFallback{changelog-Removed}{Removed}
+\DeclareTranslationFallback{changelog-Fixed}{Fixed}
+\DeclareTranslationFallback{changelog-Security}{Security}
+\DeclareTranslationFallback{changelog-Miscellaneous}{Miscellaneous}
+\DeclareTranslationFallback{changelog-Unreleased}{Unreleased}
+\DeclareTranslationFallback{changelog-Yanked}{YANKED}
+% English translations
+\DeclareTranslation{English}{changelog-Added}{Added}
+\DeclareTranslation{English}{changelog-Changed}{Changed}
+\DeclareTranslation{English}{changelog-Deprecated}{Deprecated}
+\DeclareTranslation{English}{changelog-Removed}{Removed}
+\DeclareTranslation{English}{changelog-Fixed}{Fixed}
+\DeclareTranslation{English}{changelog-Security}{Security}
+\DeclareTranslation{English}{changelog-Miscellaneous}{Miscellaneous}
+\DeclareTranslation{English}{changelog-Unreleased}{Unreleased}
+\DeclareTranslation{English}{changelog-Yanked}{YANKED}
+% German translations
+% Alternative german translations as comment at the end of the line
+\DeclareTranslation{German}{changelog-Added}{Hinzugef\"{u}gt}% Neu
+\DeclareTranslation{German}{changelog-Changed}{Ge\"{a}ndert}
+\DeclareTranslation{German}{changelog-Deprecated}{Überholt}% Veraltet
+\DeclareTranslation{German}{changelog-Removed}{Entfernt}
+\DeclareTranslation{German}{changelog-Fixed}{Behoben}% Fehlerbehebung
+\DeclareTranslation{German}{changelog-Security}{Sicherheit}
+\DeclareTranslation{German}{changelog-Miscellaneous}{Verschiedenes}
+\DeclareTranslation{German}{changelog-Unreleased}{Unver\"{o}ffentlicht}
+\DeclareTranslation{German}{changelog-Yanked}{Zur{\"u}ckgezogen}
+
 \newif\ifchangelog at versionfirst
 \newcommand{\changelog at item}[1]{%
 	\noindent
@@ -34,16 +71,16 @@
 	\begin{changelogitemize}%
 }
 
-\newcommand{\changelogyanked}{\fbox{\textbf{YANKED}}}
+\newcommand{\changelogyanked}{\fbox{\textbf{\GetTranslation{changelog-Yanked}}}}
 
 \newcommand{\changelog at sectioncmds}{
-	\newcommand{\added}     {\changelog at item{Added}}
-	\newcommand{\changed}   {\changelog at item{Changed}}
-	\newcommand{\deprecated}{\changelog at item{Deprecated}}
-	\newcommand{\removed}   {\changelog at item{Removed}}
-	\newcommand{\fixed}     {\changelog at item{Fixed}}
-	\newcommand{\security}  {\changelog at item{Security}}
-	\newcommand{\misc}      {\changelog at item{Miscellaneous}}
+	\newcommand{\added}     {\changelog at item{\GetTranslation{changelog-Added}}}
+	\newcommand{\changed}   {\changelog at item{\GetTranslation{changelog-Changed}}}
+	\newcommand{\deprecated}{\changelog at item{\GetTranslation{changelog-Deprecated}}}
+	\newcommand{\removed}   {\changelog at item{\GetTranslation{changelog-Removed}}}
+	\newcommand{\fixed}     {\changelog at item{\GetTranslation{changelog-Fixed}}}
+	\newcommand{\security}  {\changelog at item{\GetTranslation{changelog-Security}}}
+	\newcommand{\misc}      {\changelog at item{\GetTranslation{changelog-Miscellaneous}}}
 }
 
 \define at cmdkeys{version}{author, version, date, changes}
@@ -74,7 +111,7 @@
 \newcommand{\changelog at shortversion@definedate}{%
 	\@ifundefined{cmdKV at version@version}{
 		\@ifundefined{cmdKV at version@date}{
-			\newcommand{\cmdKV at version@version}{Unreleased}
+			\newcommand{\cmdKV at version@version}{\GetTranslation{changelog-Unreleased}}
 			\let\cmdKV at version@date\today
 		}{%
 			\let\cmdKV at version@version\cmdKV at version@date



More information about the tex-live-commits mailing list