\ifx \iere  \undefined \def\iere  {\highordinalstr{re}}  \fi
\def\In[#1,#2]{\doifsomething{#1}{\in[#1]}\if\relax#2\else, \In[#2]\fi}
\enableregime[utf]

\unprotect
\newcount\RevC
\def\Changes[#1]{%
  \getgparameters[Changes@][date=, labels=, #1]% modif, labels, date
  \doifundefined{Changes@modif}{\gdef\Changes@modif{%
	  \translate[fr=1\iere\ version,en=First version,de=Erste Version]}}%
  \global\advance\RevC by 1 \bTR
  \expanded{\bTD \the\RevC \eTD}%
  \expanded{\bTD \Changes@date \eTD}\expanded{\bTD \Changes@modif \eTD}%
  \expandafter\bTD \expandafter\In\expandafter[\Changes@labels,\relax]\eTD
  \eTR}

\def\startChanges{%
  \bTABLE[option=stretch, textwidth=\textwidth]
  \bTR[background=screen]
  \bTD \translate[fr=Rév, en=Rev, de=Rev].\eTD
  \bTD \translate[fr=Date, en=Date, de=Datum]\eTD
  \bTD \translate[fr=Origine de la mise à jour, en=Reason for update,
    de=Grund der Änderung]\eTD
  \bTD \translate[fr=§ modifié, en=modified §, de=mod. §en]\eTD\eTR}
\def\stopChanges{\eTABLE}

\protect

\doifnotmode{demo}{\endinput}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%D Usage example:

\usemodule[changes]
\setupcolors[state=start]
\starttext
\title{The big title}

\startChanges
\Changes[date=1.1.2001]
\Changes[date=2.2.2002, labels=sec:a, modif=Added text from Tufte]
\Changes[date=3.3.2003, labels=sec:b, modif=Added text from Knuth]
\Changes[date=4.4.2004, labels={sec:a,sec:b}, modif=Added even more text]
\stopChanges

\subject{Contents}
\placecontent

\section[sec:a]{First section}
\input tufte
more text

\section[sec:b]{Second section}
\input knuth
more text
\stoptext
