diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/changelog/changelog.pdf | bin | 41606 -> 46076 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/changelog/changelog.tex | 89 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/changelog/changelog.sty | 57 |
3 files changed, 122 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/latex/changelog/changelog.pdf b/Master/texmf-dist/doc/latex/changelog/changelog.pdf Binary files differindex d93f161a082..bc54571d96f 100644 --- a/Master/texmf-dist/doc/latex/changelog/changelog.pdf +++ b/Master/texmf-dist/doc/latex/changelog/changelog.pdf diff --git a/Master/texmf-dist/doc/latex/changelog/changelog.tex b/Master/texmf-dist/doc/latex/changelog/changelog.tex index 5802746cdc2..22a62221959 100644 --- a/Master/texmf-dist/doc/latex/changelog/changelog.tex +++ b/Master/texmf-dist/doc/latex/changelog/changelog.tex @@ -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,19 +13,6 @@ \newcommand{\cl}{\ctan{changelog}} \newcommand{\keepachangelog}{\https{keepachangelog.com}} -% a list of colors; use \color{colorname} -\makeatletter -\newenvironment{colorlist} - {\begin{itemize} - \let\old@item\item - \renewcommand{\item}[1]{% - \old@item[\fcolorbox{black}{##1}{\vphantom{X}\hspace{1em}}] - \texttt{##1} - } - } - {\end{itemize}} -\makeatother - \makeatletter \renewcommand{\SX@explpreset}{ language=[LaTeX]TeX, @@ -39,7 +33,7 @@ \author{Rebecca Turner\thanks{Brandeis University; \email{rebeccaturner@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 @@ Prints the ``revoked release'' notice: \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@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 diff --git a/Master/texmf-dist/tex/latex/changelog/changelog.sty b/Master/texmf-dist/tex/latex/changelog/changelog.sty index 403ebbddbde..491e78d7548 100644 --- a/Master/texmf-dist/tex/latex/changelog/changelog.sty +++ b/Master/texmf-dist/tex/latex/changelog/changelog.sty @@ -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,6 +21,43 @@ \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@versionfirst \newcommand{\changelog@item}[1]{% @@ -34,16 +71,16 @@ \begin{changelogitemize}% } -\newcommand{\changelogyanked}{\fbox{\textbf{YANKED}}} +\newcommand{\changelogyanked}{\fbox{\textbf{\GetTranslation{changelog-Yanked}}}} \newcommand{\changelog@sectioncmds}{ - \newcommand{\added} {\changelog@item{Added}} - \newcommand{\changed} {\changelog@item{Changed}} - \newcommand{\deprecated}{\changelog@item{Deprecated}} - \newcommand{\removed} {\changelog@item{Removed}} - \newcommand{\fixed} {\changelog@item{Fixed}} - \newcommand{\security} {\changelog@item{Security}} - \newcommand{\misc} {\changelog@item{Miscellaneous}} + \newcommand{\added} {\changelog@item{\GetTranslation{changelog-Added}}} + \newcommand{\changed} {\changelog@item{\GetTranslation{changelog-Changed}}} + \newcommand{\deprecated}{\changelog@item{\GetTranslation{changelog-Deprecated}}} + \newcommand{\removed} {\changelog@item{\GetTranslation{changelog-Removed}}} + \newcommand{\fixed} {\changelog@item{\GetTranslation{changelog-Fixed}}} + \newcommand{\security} {\changelog@item{\GetTranslation{changelog-Security}}} + \newcommand{\misc} {\changelog@item{\GetTranslation{changelog-Miscellaneous}}} } \define@cmdkeys{version}{author, version, date, changes} @@ -74,7 +111,7 @@ \newcommand{\changelog@shortversion@definedate}{% \@ifundefined{cmdKV@version@version}{ \@ifundefined{cmdKV@version@date}{ - \newcommand{\cmdKV@version@version}{Unreleased} + \newcommand{\cmdKV@version@version}{\GetTranslation{changelog-Unreleased}} \let\cmdKV@version@date\today }{% \let\cmdKV@version@version\cmdKV@version@date |