texlive[62938] Master/texmf-dist: cooking-units (27mar22)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 6 00:09:22 CEST 2022


Revision: 62938
          http://tug.org/svn/texlive?view=revision&revision=62938
Author:   karl
Date:     2022-04-06 00:09:21 +0200 (Wed, 06 Apr 2022)
Log Message:
-----------
cooking-units (27mar22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/cooking-units/cooking-units.pdf
    trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.dtx
    trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.ins
    trunk/Master/texmf-dist/tex/latex/cooking-units/cooking-units.sty

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

Modified: trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.dtx	2022-04-05 22:09:02 UTC (rev 62937)
+++ trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.dtx	2022-04-05 22:09:21 UTC (rev 62938)
@@ -82,7 +82,7 @@
 %\keepsilent
 \askforoverwritefalse
 \preamble
-Copyright (C) 2016--2021 by Ben Vitecek (current Maintainer)
+Copyright (C) 2016--2022 by Ben Vitecek (current Maintainer)
 
 This file may be distributed and/or modified under the 
 conditions of the LaTeX Project Public License, either 
@@ -143,9 +143,9 @@
 \usepackage{nicefrac}
 \usepackage{cleveref}
 \usepackage{mathtools}
-\usepackage{siunitx}
+\usepackage{siunitx}[=v2]
 \usepackage{totalcount}
-\usepackage{microtype}
+%\usepackage{microtype}
 \usepackage{enumitem}
 
 
@@ -244,7 +244,7 @@
 \NewDocumentCommand \PrintUnit { o m }
   {
     \__cookingunits_culang_let:nnN { name } {#2} \l_tmpa_tl
-    \tl_if_eq:NNF \l_tmpa_tl \q__cookingunits_no_translation
+    \tl_if_eq:NNF \l_tmpa_tl \c__cookingunits_no_translation_str
       { \l_tmpa_tl }
     \IfNoValueF {#1} {#1}
     &
@@ -307,7 +307,7 @@
           { 
             \cs_if_eq:NNTF ##1 \\ 
               { \textbackslash\textbackslash \\  } 
-              { \textbackslash \textcolor{blue}{\cs_to_str:N ##1} }
+              { \textbackslash \textcolor {blue} { \cs_to_str:N ##1 } }
           }{
             \token_if_letter:NTF ##1
               {##1}
@@ -449,13 +449,13 @@
       { \l_translation_does_not_exist_tl }
       { 
         \__cu_use:n { culang_let_for:nnnN } {#1} { unit-symbol } {#2} \l_tmpa_tl
-        \tl_if_in:NnTF \l_tmpa_tl \q__cookingunits_no_translation
+        \tl_if_in:NnTF \l_tmpa_tl \c__cookingunits_no_translation_str
           { \l_translation_does_not_exist_tl }
           { \l_tmpa_tl }
       }
     & 
     \__cu_use:n { culang_let_for:nnnN } {#1} { name } {#2} \l_tmpa_tl
-    \tl_if_in:NnTF \l_tmpa_tl \q__cookingunits_no_translation
+    \tl_if_eq:NNTF \l_tmpa_tl \c__cookingunits_no_translation_str
       { \l_translation_does_not_exist_tl }
       { \l_tmpa_tl }
     & 
@@ -463,13 +463,13 @@
     \__cu_use:n { culang_let_for:nnnN } {#1} { name-pl } {#2} \l_tmpb_tl
     \str_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
       { 
-        \tl_if_in:NnTF \l_tmpb_tl \q__cookingunits_no_translation
+        \tl_if_eq:NNTF \l_tmpb_tl \c__cookingunits_no_translation_str
           { \l_translation_does_not_exist_tl }
           { (\l_tmpb_tl) }
       }
     &
     \__cu_use:n { culang_let_for:nnnN } {#1} { gender } {#2} \l_tmpa_tl
-    \tl_if_in:NnTF \l_tmpa_tl \q__cookingunits_no_translation
+    \tl_if_eq:NNTF \l_tmpa_tl \c__cookingunits_no_translation_str
       { \l_translation_does_not_exist_tl }
       { \l_tmpa_tl }
   }
@@ -477,14 +477,12 @@
 \NewDocumentCommand \CreateTableForPhrases { >{\TrimSpaces}  m }
   {
     \seq_clear:N \l_tmpa_seq
-    \__cu_use:n { culang_let_for:nnnN } {#1} { phrase } { phrase-prop } \l_tmpa_prop
+    \__cu_use:n { culang_get_phrase_prop_for:nN } {#1} \l_tmpa_prop
     \prop_if_exist:NTF \l_tmpa_prop
       {
-        \tl_if_eq:NNTF \q__cooking_units_no_translation \l_tmpa_prop
+        \tl_if_eq:NNTF \c__cookingunits_no_translation_str \l_tmpa_prop
           { \ERRORCreateTablePhraseII }
-          {
-            \prop_get:NnN \l_tmpa_prop { seq } \l_tmpa_seq
-          }
+          { \prop_get:NnN \l_tmpa_prop { seq } \l_tmpa_seq }
       }
       { \ERRORCreateTablePhraseI }
     \seq_gput_right:Nn \l_tmpa_seq { THEEND }
@@ -553,10 +551,10 @@
     \endlist
   }
 \makeatletter
-\newenvironment{mydescription}
-               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
-                        \let\makelabel\descriptionlabel}}
-               {\endlist}
+%\newenvironment{mydescription}
+%               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
+%                        \let\makelabel\descriptionlabel}}
+%               {\endlist}
 \renewcommand*\descriptionlabel[1]{\hspace\labelsep
                                 \normalfont\bfseries #1}
 \makeatother
@@ -804,6 +802,9 @@
 % \changes {2021/03/21} {2.00} {New commands to define keys: \mycs{cudefinekeychain} and \mycs{cuaddtokeychain}.}
 % \changes {2021/03/21} {2.00} {Using commands as unit-keys now works.}
 % 
+% \changes {2022/03/26} {2.00a} {Bugfix: Fixing property list retrival error (storing property lists via translations did not work too well).}
+% \changes {2022/03/26} {2.00a} {Bugfix: |\cuam| prints a unit in case of an error. This also happens with \opt{parse-number=false}.}
+% \changes {2022/03/26} {2.00a} {Bugfix: Remove \cs{peek_meaning_ignore_spaces:NTF}.}
 %
 %
 %
@@ -849,11 +850,11 @@
 % not very \LaTeX-like, so I started writing some code to convert
 % units. I expanded the code, rewrote it in \LaTeX3 (which is much
 % more pleasant than \LaTeXe) and here it is.
+% 
 %
 %
 %
 %
-%
 % \subsection{Supported languages}
 % \begin{itemize}
 %  \item German
@@ -3207,9 +3208,9 @@
 % 
 %
 %
+% 
 %
 %
-%
 % 
 %
 %
@@ -3367,10 +3368,10 @@
 %
 %
 %
+% 
 %
 %
 %
-%
 % \appendix
 %
 % \section{Translations} 
@@ -3385,6 +3386,7 @@
 % shown.
 %
 % \small
+% 
 %
 %\clearpage
 % \subsection{English}
@@ -3449,9 +3451,9 @@
 %
 %
 %
+% \normalsize
 %
 %
-%
 % \section{US, Imperial and Other units}
 % \label{sec:other-units}
 %
@@ -3559,108 +3561,6 @@
 %
 %
 %
-%
-% \begin{comment}
-%^^A \section{Notes and other stuff}
-%^^A This section contains stuff which might or might not be interesting.
-%^^A
-%^^A \subsection{More or less FAQ}
-%^^A
-%^^A \num{624150912.6 +- 3.9 e+10}
-%^^A \num{6.241509126 +- 0.000000039 e+18}
-%^^A
-%^^A \num{8.6173303 +- 00000.0000050 e-5}
-%^^A
-%^^A \subsection{Calculation}
-%^^A This subsection deals with some regarding the conversion to certain units.
-%^^A Mostly to (I like to call them) \enquote{electron volt units} (or natural units).
-%^^A Let's begin.
-%^^A
-%^^A We start with the easiest one: conversion of joule into electron volt.
-%^^A Easy because Wikipedia and nearly every physics book knows the answer. 
-%^^A And according to Wikipedia
-%^^A \begin{align}
-%^^A  \SI{1}{\eV} &= \SI{1.6021766208(98)e-19}{\joule} \\
-%^^A  \SI{1}{\joule} &= \SI{6.241509126 +- 0.000000039 e+18}{\eV}
-%^^A \end{align}
-%^^A Adding this is no problem: 
-%^^A \begin{lstlisting}
-%^^A   \cuaddtokeys {J} {eV} { 1.6021766208e-19 }
-%^^A \end{lstlisting}
-%^^A
-%^^A
-%^^A Great, next Temperature (kelvin) to electron volt. Also no problem at all
-%^^A because joule and kelvin are related by the boltzmann constant $k_B$ with
-%^^A \begin{equation}
-%^^A   energy (\si{\joule}) = k_B \cdot temperature (\si{\kelvin})
-%^^A \end{equation}
-%^^A as $[k_B]= \sfrac{\si{\joule}}{\si{\kelvin}}$ and 
-%^^A $k_B= \SI{1.38064852(79)e-23}{\joule\per\kelvin}$. Now using the power
-%^^A of (more or less basic, but somehow annoying) mathematics we get:
-%^^A \begin{align}
-%^^A  [k_B] &= \SI{1.38064852(79)e-23}{\joule\per\kelvin} = \\
-%^^A &= \num{1.38064852(79)e-23} \cdot \SI{6.241509126 +- 0.000000039 e+18 }{\eV\per\K} = \\
-%^^A &= \SI{8.6173303 +- 0.0000050 e-5 }{\eV\per\K} 
-%^^A \end{align}
-%
-%
-%^^A \section{Notes and other stuff}
-%^^A \subsection{Some details to electron volts}
-%^^A This section explains how I calculated the values for conversion into electron volt
-%^^A or the respective derivative. Let's begin with some constants (from Wikipedia), note that
-%^^A \begin{equation*}
-%^^A   \num{1.23456(78)e-9} = \num[separate-uncertainty = true]{1.23456(78)e-9}
-%^^A \end{equation*}
-%^^A just for info.
-%^^A
-%^^A \begin{align}
-%^^A   \SI{1}{\eV} &= \SI{1.6021766208(98)e-19}{\J} \\
-%^^A   \hbar &= \SI{1.054571800(13)e-34}{\J\s} \\
-%^^A   k_B &= \SI{1.38064852(79)e-23}{\J\per\K} = \SI{8.6173303(50)e-5}{\eV\per\K}\\
-%^^A   c &= \SI{299792458}{\m\per\s} 
-%^^A \end{align}
-%^^A
-%^^A Note that all those and following values are rounded to the second relevant figure of the 
-%^^A uncertainty of the value.
-%^^A
-%^^A Well then, next are temperatures.
-%^^A
-%^^A Temperatures are fairly easy. Just convert the temperature of your choice to kelvin
-%^^A and multiplicate it with $k_B$:
-%^^A \begin{align}
-%^^A   \SI{1}{\K} * k_B &= \SI{8.6173303(50)e-5}{\eV}
-%^^A \end{align}
-%^^A
-%^^A Next is more complicated. To compute the resulting unceartanity I using
-%^^A \enquote{Gauß'sches Fehlerfortpflanzungsgesetz} (I don't know if this has 
-%^^A a translation). Anyway.  We know that
-%^^A \begin{align*}
-%^^A    \frac{\SI{1}{\eV}}{c^2} &= \frac{\SI{1.6021766208e-19}{\J}}{(\SI{299792458}{\m\per\s})^2}
-%^^A    = \frac{\SI{1.6021766208e-19}{\kg\m\squared\per\s\squared}}{\SI{8,98755178736818E16}{\m\squared\per\s\squared}} = \\
-%^^A &\frac{\SI{1.6021766208e-3}{\kg}}{\num{8,98755178736818}} =
-%^^A \SI{1782661906,94091624922088}{\kg}
-%^^A \end{align*}
-%^^A
-%^^A Great, now we have to calucalte the unceartinity:
-%^^A \begin{align}
-%^^A   f(\si{\eV},c) &= \frac{\si{\eV}}{c^2} \\
-%^^A   df(\si\eV,c) &= \sqrt{ (\frac{\partial f}{\partial \si\eV})^2 * (\Delta \si\eV)^2 +  (\frac{\partial f}{\partial c})^2  * (\Delta c)^2 } = \\
-%^^A &= \sqrt{  (\frac{1}{c^2})^2 * (\Delta \si\eV)^2 + (-2\frac{eV}{c^{-3}})^2  * (\Delta c)^2 }  
-%^^A \end{align}
-%^^A
-%^^A Now we know that $\Delta c = 0$:
-%^^A \begin{align}
-%^^A   df(\si\eV,c) &= \sqrt{  (\frac{1}{c^2})^2 * (\Delta \si\eV)^2 }  = 
-%^^A \sqrt{ \frac{1}{(\SI{299792458}{\m\per\s} )^2} * (\SI{0.0000000098e-19}{\J})^2 } \\
-%^^A &= 
-%^^A \end{align}
-% \end{comment}
-%
-%
-%
-%
-%
-%
 %\end{documentation}
 %
 %
@@ -3703,14 +3603,14 @@
 %    \begin{macrocode}
 \ProvidesExplPackage
   {cooking-units}
-  {2021/05/16}
-  {2.00} 
+  {2022/03/26}
+  {2.00a} 
   {Ein Paket fuer Kocheinheiten}
 %    \end{macrocode}
 %
 % Checking if \pkg{expl3} is up-to-date, otherwise abort the loading of the package.
 %    \begin{macrocode}
-\@ifpackagelater { expl3 } { 2021/05/07 }
+\@ifpackagelater { expl3 } { 2022/02/24 }
   { }
   {
     \PackageError { cooking-units } { Support~package~expl3~too~old }
@@ -3731,7 +3631,7 @@
 %
 % Checking if \pkg{translations} is up-to-date, otherwise abort the loading of the package.
 %    \begin{macrocode}
-\@ifpackagelater { translations } { 2021/01/17 }
+\@ifpackagelater { translations } { 2022/02/05 }
   { }
   {
     \PackageError { cooking-units } { Support~package~translations~too~old }
@@ -3761,6 +3661,7 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \bool_new:N \g_@@_opt_numeral_bool
+%\bool_new:N \g_@@_opt_debug_bool
 \keys_define:nn { cooking-units }
   {
     use-numerals .code:n = 
@@ -3771,6 +3672,8 @@
     use-numerals .default:n = { false },
     use-fmtcount-numerals .bool_gset:N = \g_@@_opt_numeral_bool ,
     use-fmtcount-numerals .default:n = { false },
+%    debug .bool_set:N = \g_@@_opt_debug_bool , 
+%    debug .default:n = { true } , 
     unknown .code:n = { \msg_error:nnxx { cooking-units } { key-unknown }
       { \l_keys_path_str } { cooking-units }
      }
@@ -3992,6 +3895,8 @@
 \tl_new:N \l_@@_stored_units_tl
 \tl_new:N \l_@@_stored_formula_tl
 \tl_new:N \l_@@_base_tl
+\tl_new:N \l_cookingunits_raw_amount_a_tl
+\tl_new:N \l_cookingunits_raw_amount_b_tl
 %    \end{macrocode}
 %    \begin{macrocode}
 \tl_new:N \l_@@_cmd_hook_tl
@@ -4062,7 +3967,7 @@
 %   The dimension between the fraction and the mixed fraction part is
 %   stored within this macro. There is no real reason why I have
 %   chosen this distance to be 0.1em, I just thought that it looks
-%   best.  But if someone has some ideas of how large this distance
+%   best.  But if someone has some ideas of how large this distancee
 %   should be I am happy to listen.
 %    \begin{macrocode}
 \dim_new:N \l_@@_mixed_frac_dim
@@ -4303,11 +4208,12 @@
 %    \end{macrocode}
 %\end{macro}
 %
-% \begin{macro}{ \q_@@_no_translation }
+% \begin{macro}{ \q_@@_no_translation_str }
 %  Checking value if a translation is avaiable.
 %    \begin{macrocode}
-\quark_new:N \q_@@_no_translation
-%\cs_new:Npn \q_@@_no_translation { asdasd\ewhkerhjkwejhk } 
+\quark_new:N \q_@@_no_translation_str
+\str_const:Nn \c_@@_no_translation_str { no-translation-sady-found-@@ }
+%\cs_new:Npn \q_@@_no_translation_str { asdasd\ewhkerhjkwejhk } 
 %    \end{macrocode}
 %\end{macro}
 %
@@ -6615,7 +6521,7 @@
 \prg_new_conditional:Npnn \@@_culang_unitname_let:Nn #1#2 { TF, F , T }
   {
     \@@_culang_let:nnN { name } {#2} #1
-    \tl_if_eq:NNTF #1 \q_@@_no_translation
+    \tl_if_eq:NNTF #1 \c_@@_no_translation_str
       { \prg_return_false: }
       { \prg_return_true: }
   }
@@ -6671,17 +6577,17 @@
 %
 %    \begin{macrocode}
 \@@_culang_def_base:nnn { name } { decimal-mark }  { . }
-\@@_culang_def_base:nnn { name-pl } { decimal-mark } { \q_@@_no_translation }
+\@@_culang_def_base:nnn { name-pl } { decimal-mark } { \c_@@_no_translation_str }
 \@@_culang_def_for:nnnn { German } { name-pl } { decimal-mark } { , }
 %    \end{macrocode}
 % Note that the plural versions just exist for completing the set.
 %    \begin{macrocode}
-\@@_culang_def_base:nnn { name } { one (m) } { \q_@@_no_translation }
-\@@_culang_def_base:nnn { name } { one (f) } { \q_@@_no_translation }
-\@@_culang_def_base:nnn { name } { one (n) } { \q_@@_no_translation }
-\@@_culang_def_base:nnn { name-pl } { one (m) }  { \q_@@_no_translation }
-\@@_culang_def_base:nnn { name-pl } { one (f) } { \q_@@_no_translation }
-\@@_culang_def_base:nnn { name-pl } { one (n) } { \q_@@_no_translation }
+\@@_culang_def_base:nnn { name } { one (m) } { \c_@@_no_translation_str }
+\@@_culang_def_base:nnn { name } { one (f) } { \c_@@_no_translation_str }
+\@@_culang_def_base:nnn { name } { one (n) } { \c_@@_no_translation_str }
+\@@_culang_def_base:nnn { name-pl } { one (m) }  { \c_@@_no_translation_str }
+\@@_culang_def_base:nnn { name-pl } { one (f) } { \c_@@_no_translation_str }
+\@@_culang_def_base:nnn { name-pl } { one (n) } { \c_@@_no_translation_str }
 %    \end{macrocode}
 %    \begin{macrocode}
 \@@_culang_def_for:nnnn { English } { name } { one (m) } { one }
@@ -6696,7 +6602,7 @@
 %
 %    \begin{macrocode}
 \@@_culang_def_base:nnn { name } { cutext-range-sign } { -- }
-\@@_culang_def_base:nnn { name-pl } { cutext-range-sign } { \q_@@_no_translation }
+\@@_culang_def_base:nnn { name-pl } { cutext-range-sign } { \c_@@_no_translation_str }
 \@@_culang_def_for:nnnn { German } { name } { cutext-range-sign } { ~bis~ }
 \@@_culang_def_for:nnnn { English } { name } { cutext-range-sign } { ~to~ }
 %    \end{macrocode}
@@ -6734,16 +6640,18 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_def_new_type_aux:Nnn #1#2#3
   {
-    \cs_new:cpn { @@_set_ #2 _to:n } ##1
+    \cs_new_nopar:cpn { @@_set_ #2 _to:n } ##1
       { 
-        \tl_if_exist:cF { c_@@_#2_ ##1 _tl } { \tl_show:n { ERROR-set-#2-##1 } }
-        \tl_set_eq:Nc #1 { c_@@_#2_ ##1 _tl } 
+        \tl_if_exist:cF { c_@@_#2_ ##1 _tl } 
+          { \msg_error:nnn {cooking-units } { internal-error } { Type } { ERROR-set-#2-##1 } }
+         \tl_set_eq:Nc #1 { c_@@_#2_ ##1 _tl }  
       }
     \tl_if_empty:nF {#3}
       {
         \prg_new_conditional:cpnn { @@_if_ #2 _equal:n } ##1 {#3}
           {
-            \tl_if_exist:cF { c_@@_#2_ ##1 _tl } { \tl_show:n { ERROR-check-#2-##1 } }
+            \tl_if_exist:cF { c_@@_#2_ ##1 _tl } 
+              { \msg_error:nnnn {cooking-units }  { internal-error } { Type-2 } { ERROR-set-#2-##1 } }
             \tl_if_eq:NcTF #1 { c_@@_#2_ ##1 _tl } 
               { \prg_return_true: }
               { \prg_return_false: }
@@ -6798,7 +6706,6 @@
 %   parses options and decides (depending on which command was used)
 %   what to do with the stuff and how to print it.
 %    \begin{macrocode}
-\bool_new:N \l_@@_skip_first_part_bool
 \cs_new:Npn \@@_do_the_stuff:nnnnnn #1#2#3#4#5#6
   {
 %  #1 -- label
@@ -7217,7 +7124,11 @@
 \cs_new:Npn \@@_new_print_unit_correctly:
   {
     \@@_if_state_equal:nTF { error }
-      { \@@_print_unit_in_case_of_error: }
+      { 
+        \tl_case:NnF \l_@@_cmd_type_tl
+          { \c_@@_cmd_type_cuam_tl { } }
+          { \@@_print_unit_in_case_of_error: }
+      }
       {
         \tl_case:NnF \l_@@_cmd_type_tl
           {
@@ -7373,12 +7284,12 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_create_internal_error:nN #1#2
   {
-    \@@_set_case_to:n { error }
+    \@@_set_state_to:n { error }
     \msg_error:nnnV { cooking-units } { internal-error } {#1} #2 
   }
 \cs_new:Npn \@@_create_error:n #1
   {
-    \@@_set_case_to:n { error }
+    \@@_set_state_to:n { error }
     \msg_error:nnV { cooking-units } {#1} \l_@@_original_amount_tl 
   }
 \cs_new:Npn \@@_create_error_and_stop:n #1
@@ -7388,7 +7299,7 @@
   }
 \cs_new:Npn \@@_create_error:nn #1#2
   {
-    \@@_set_case_to:n { error }
+    \@@_set_state_to:n { error }
     \msg_error:nnnV { cooking-units } {#1} {#2} \l_@@_original_amount_tl 
   }
 %    \end{macrocode}
@@ -7473,7 +7384,7 @@
 % \end{macro}
 %
 %
-% \begin{macro}{ \@@_split_and_parse:}
+% \begin{macro}{ \@@_split_and_parse:N}
 %   Splits the input into fractions or ranges (or numbers).
 %    \begin{macrocode}
 \cs_new:Npn \@@_split_and_parse:N #1
@@ -8247,8 +8158,8 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_cuam_post_process_input_phrases:NN #1#2
   {
-    \@@_culang_let:nnN { phrase } { phrase-prop } \l_@@_phrase_prop
-    \tl_if_eq:NNT \q_@@_no_translation \l_@@_phrase_prop
+    \@@_culang_get_phrase_prop:N \l_@@_phrase_prop
+    \tl_if_eq:NNT \c_@@_no_translation_str \l_@@_phrase_prop
       { \use_none_delimit_by_q_stop:w }
     \prop_get:NnN \l_@@_phrase_prop { seq } \l_@@_phrase_numbers_seq
 %  
@@ -9119,8 +9030,8 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_set_cooking_unit_base_translation:n #1
   {
-    \@@_culang_def_base:nnn { name } {#1} \q_@@_no_translation
-    \@@_culang_def_base:nnn { name-pl } {#1} \q_@@_no_translation
+    \@@_culang_def_base:nnn { name } {#1} \c_@@_no_translation_str
+    \@@_culang_def_base:nnn { name-pl } {#1} \c_@@_no_translation_str
     \@@_culang_def_base:nnn { gender } {#1} { m }
   }
 %    \end{macrocode}
@@ -9222,11 +9133,11 @@
       {
         \seq_pop:NN \g_@@_stored_derived_formula_seq \l_@@_tmpb_tl
         \prop_put:NnV \l_@@_derived_units_prop {##1} \l_@@_tmpb_tl
-        \seq_pop:NN \g_@@_stored_derived_unit_print_seq \l_@@_tmpa_tl
 %    \end{macrocode}
 %  First create the unit, \emph{then} set the reference to the base unit.
 %  (Else it is not yet defined)
 %    \begin{macrocode}
+        \seq_pop:NN \g_@@_stored_derived_unit_print_seq \l_@@_tmpa_tl
         \exp_args:NNx \declarecookingunit  [ {symbol={\l_@@_tmpa_tl}} ] {##1}
         \tl_set_eq:cN { l_@@_base_key_unit_ ##1 _tl } \l_@@_curr_unit_tl
       }
@@ -9494,9 +9405,12 @@
         \@@_error_if_unit_not_defined:nNT {#1} \l_@@_curr_unit_tl 
           { \@@_set_state_to:n { error } }
       }
-    \peek_meaning_ignore_spaces:NTF [
-      { \@@_parse_definename_optional_unitsymbol:w }
-      { \@@_parse_definename_singular:n }  
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF [
+          { \@@_parse_definename_optional_unitsymbol:w }
+          { \@@_parse_definename_singular:n }  
+      }
   }
 %    \end{macrocode}
 % \end{macro}  
@@ -9531,9 +9445,12 @@
     \quark_if_recursion_tail_stop_do:nn {#1} 
       { \msg_error:nn { cooking-units } { missing-argument } }
     \prop_put:Nnn \l_@@_tmpa_prop { name } {#1}
-    \peek_meaning_ignore_spaces:NTF [
-      { \@@_parse_definename_optional_plural:w }
-      { \@@_parse_definename_optional_plural:w [#1] }
+    \peek_remove_spaces:n 
+      {
+        \peek_meaning:NTF [
+          { \@@_parse_definename_optional_plural:w }
+          { \@@_parse_definename_optional_plural:w [#1] }
+      }
   }
 %    \end{macrocode}
 % \end{macro}  
@@ -9545,9 +9462,12 @@
 \cs_new:Npn \@@_parse_definename_optional_plural:w [#1]
   {
     \prop_put:Nnn \l_@@_tmpa_prop { name-pl } {#1}
-    \peek_meaning_ignore_spaces:NTF <
-      { \@@_parse_definename_optional_gender:w  }
-      { \@@_parse_definename_optional_gender:w <m> }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF <
+          { \@@_parse_definename_optional_gender:w  }
+          { \@@_parse_definename_optional_gender:w <m> }
+      }
   }
 %    \end{macrocode}
 % \end{macro}  
@@ -9635,17 +9555,38 @@
 %
 %
 %
-% \begin{macro}{ \@@_cuprint_define_printed_unit:nn }
+% \begin{macro}{ }
 %  Defining phrases. Phrases (sadly) depend on the language. 
 %  The idea is going to be: Each language has its own property list
 %  which is going to be stored for each language. Later, the property
 %  list is recoverd for the language currently used. If no phrase is defined
-%  the fallback |\q_@@_no_translation| is returned.
+%  the fallback |\c_@@_no_translation_str| is returned.
 %    \begin{macrocode}
-\@@_culang_def_base:nnn { phrase } { phrase-prop } { \q_@@_no_translation }
+\@@_culang_def_base:nnn { phrase } { phrase-prop } { \c_@@_no_translation_str }
+\@@_culang_def_base:nnn { phrase } { phrase-lang } { Humphry-Drumphy }
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{  }
+%    \begin{macrocode}
+\cs_new:Npn \@@_culang_get_phrase_prop:N #1
+  {
+    \@@_culang_let:nnN { phrase } { phrase-lang } \l_@@_language_tl
+    \prop_if_exist:cTF { l_@@_ \l_@@_language_tl _phrase_prop }
+      {
+        \prop_set_eq:Nc #1 { l_@@_ \l_@@_language_tl _phrase_prop }
+      }
+      { \tl_set_eq:NN #1 \c_@@_no_translation_str  }
+  }
+\cs_new:Npn \@@_culang_get_phrase_prop_for:nN #1#2
+  {
+    \prop_set_eq:Nc #2 { l_@@_ #1 _phrase_prop }
+%    \prop_if_exist:cT { l_@@_ #1 _phrase_prop }
+%      { \prop_set_eq:Nc \l_@@_phrase_prop { l_@@_ #1 _phrase_prop } }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{ \cudefinephrase }
 %  Defining some phrases. This command is just a wrapper for the
 %  subcommand.
@@ -9684,21 +9625,26 @@
   {
     \tl_set:Nn \l_@@_language_tl {#1}
     \@@_culang_if_translation_exists_for:VnnTF \l_@@_language_tl 
-      { phrase } { phrase-prop }
+      { phrase } { phrase-lang }
       {  
-        \@@_culang_let_for:VnnN \l_@@_language_tl { phrase } { phrase-prop }
-          \l_@@_phrase_prop
+%        \@@_culang_let_for:VnnN \l_@@_language_tl { phrase } { phrase-prop }
+%          \l_@@_phrase_prop
+        \prop_set_eq:Nc \l_@@_phrase_prop { l_@@_ \l_@@_language_tl _phrase_prop }
         \prop_get:NnN \l_@@_phrase_prop { seq } \l_@@_phrase_numbers_seq
       }{
+        \prop_new:c { l_@@_ \l_@@_language_tl _phrase_prop }
         \prop_clear:N \l_@@_phrase_prop
         \seq_clear:N \l_@@_phrase_numbers_seq
       }
-      \@@_sanitize_arrows:n {#2}
-      \@@_parse_phrase:V \l_@@_sanitise_tl
-      \@@_new_cuphrase_sort_sequence:N \l_@@_phrase_numbers_seq
-      \prop_put:NnV \l_@@_phrase_prop { seq } \l_@@_phrase_numbers_seq
-      \@@_culang_def_for:VnnV 
-        \l_@@_language_tl { phrase } { phrase-prop } \l_@@_phrase_prop
+    \@@_sanitize_arrows:n {#2}
+    \@@_parse_phrase:V \l_@@_sanitise_tl
+    \@@_new_cuphrase_sort_sequence:N \l_@@_phrase_numbers_seq
+    \prop_put:NnV \l_@@_phrase_prop { seq } \l_@@_phrase_numbers_seq
+    \prop_set_eq:cN { l_@@_ \l_@@_language_tl _phrase_prop } \l_@@_phrase_prop
+%    \@@_culang_def_for:VnnV 
+%      \l_@@_language_tl { phrase } { phrase-prop } \l_@@_phrase_prop
+    \@@_culang_def_for:VnnV 
+      \l_@@_language_tl { phrase } { phrase-lang } \l_@@_language_tl
   }
 %    \end{macrocode}
 % \end{macro}
@@ -9780,9 +9726,12 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_parse_phrase_optionals:n #1
   {
-    \peek_meaning_ignore_spaces:NTF [
-      { \@@_parse_stuff_plural:w }
-      { \@@_parse_stuff_plural:w [#1] }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF [
+          { \@@_parse_stuff_plural:w }
+          { \@@_parse_stuff_plural:w [#1] }
+      }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -9795,9 +9744,12 @@
 \cs_new:Npn \@@_parse_stuff_plural:w [#1]
   {
     \prop_put:Nnn \l_@@_tmpa_prop { -pl } {#1}
-    \peek_meaning_ignore_spaces:NTF <
-      { \@@_parse_stuff_gender:w }
-      { \@@_parse_stuff_gender:w  <m> }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF <
+          { \@@_parse_stuff_gender:w }
+          { \@@_parse_stuff_gender:w  <m> }
+      }
   }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.ins	2022-04-05 22:09:02 UTC (rev 62937)
+++ trunk/Master/texmf-dist/source/latex/cooking-units/cooking-units.ins	2022-04-05 22:09:21 UTC (rev 62938)
@@ -5,7 +5,7 @@
 %% The original source files were:
 %%
 %% cooking-units.dtx  (with options: `install')
-%% Copyright (C) 2016--2021 by Ben Vitecek (current Maintainer)
+%% Copyright (C) 2016--2022 by Ben Vitecek (current Maintainer)
 %% 
 %% This file may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either
@@ -25,7 +25,7 @@
 \input l3docstrip.tex
 \askforoverwritefalse
 \preamble
-Copyright (C) 2016--2021 by Ben Vitecek (current Maintainer)
+Copyright (C) 2016--2022 by Ben Vitecek (current Maintainer)
 
 This file may be distributed and/or modified under the
 conditions of the LaTeX Project Public License, either

Modified: trunk/Master/texmf-dist/tex/latex/cooking-units/cooking-units.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/cooking-units/cooking-units.sty	2022-04-05 22:09:02 UTC (rev 62937)
+++ trunk/Master/texmf-dist/tex/latex/cooking-units/cooking-units.sty	2022-04-05 22:09:21 UTC (rev 62938)
@@ -5,7 +5,7 @@
 %% The original source files were:
 %%
 %% cooking-units.dtx  (with options: `package')
-%% Copyright (C) 2016--2021 by Ben Vitecek (current Maintainer)
+%% Copyright (C) 2016--2022 by Ben Vitecek (current Maintainer)
 %% 
 %% This file may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either
@@ -30,10 +30,10 @@
   { \RequirePackage {expl3} }
 \ProvidesExplPackage
   {cooking-units}
-  {2021/05/16}
-  {2.00}
+  {2022/03/26}
+  {2.00a}
   {Ein Paket fuer Kocheinheiten}
-\@ifpackagelater { expl3 } { 2021/05/07 }
+\@ifpackagelater { expl3 } { 2022/02/24 }
   { }
   {
     \PackageError { cooking-units } { Support~package~expl3~too~old }
@@ -47,7 +47,7 @@
 \@ifpackageloaded { translations } { } { \RequirePackage { translations } }
 \@ifpackageloaded { xfrac } { } { \RequirePackage { xfrac } }
 \@ifpackageloaded { l3keys2e } { } { \RequirePackage { l3keys2e } }
-\@ifpackagelater { translations } { 2021/01/17 }
+\@ifpackagelater { translations } { 2022/02/05 }
   { }
   {
     \PackageError { cooking-units } { Support~package~translations~too~old }
@@ -178,6 +178,8 @@
 \tl_new:N \l__cookingunits_stored_units_tl
 \tl_new:N \l__cookingunits_stored_formula_tl
 \tl_new:N \l__cookingunits_base_tl
+\tl_new:N \l_cookingunits_raw_amount_a_tl
+\tl_new:N \l_cookingunits_raw_amount_b_tl
 \tl_new:N \l__cookingunits_cmd_hook_tl
 \tl_new:N \l__cookingunits_cunum_hook_tl
 \tl_new:N \l__cookingunits_cutext_hook_tl
@@ -282,7 +284,8 @@
 \bool_set_false:N \l__cookingunits_pckopt_cutext_keep_unit_bool
 \bool_set_eq:NN \l__cookingunits_pckopt_print_numeral_bool \g__cookingunits_opt_numeral_bool
 \quark_new:N \q__cookingunits_range
-\quark_new:N \q__cookingunits_no_translation
+\quark_new:N \q__cookingunits_no_translation_str
+\str_const:Nn \c__cookingunits_no_translation_str { no-translation-sady-found-__cookingunits }
 \tl_new:N \l__cookingunits_scrap_tl
 \tl_new:N \l__cookingunits_tmpa_tl
 \tl_new:N \l__cookingunits_tmpb_tl
@@ -1555,7 +1558,7 @@
 \prg_new_conditional:Npnn \__cookingunits_culang_unitname_let:Nn #1#2 { TF, F , T }
   {
     \__cookingunits_culang_let:nnN { name } {#2} #1
-    \tl_if_eq:NNTF #1 \q__cookingunits_no_translation
+    \tl_if_eq:NNTF #1 \c__cookingunits_no_translation_str
       { \prg_return_false: }
       { \prg_return_true: }
   }
@@ -1591,14 +1594,14 @@
     one (n)
   }
 \__cookingunits_culang_def_base:nnn { name } { decimal-mark }  { . }
-\__cookingunits_culang_def_base:nnn { name-pl } { decimal-mark } { \q__cookingunits_no_translation }
+\__cookingunits_culang_def_base:nnn { name-pl } { decimal-mark } { \c__cookingunits_no_translation_str }
 \__cookingunits_culang_def_for:nnnn { German } { name-pl } { decimal-mark } { , }
-\__cookingunits_culang_def_base:nnn { name } { one (m) } { \q__cookingunits_no_translation }
-\__cookingunits_culang_def_base:nnn { name } { one (f) } { \q__cookingunits_no_translation }
-\__cookingunits_culang_def_base:nnn { name } { one (n) } { \q__cookingunits_no_translation }
-\__cookingunits_culang_def_base:nnn { name-pl } { one (m) }  { \q__cookingunits_no_translation }
-\__cookingunits_culang_def_base:nnn { name-pl } { one (f) } { \q__cookingunits_no_translation }
-\__cookingunits_culang_def_base:nnn { name-pl } { one (n) } { \q__cookingunits_no_translation }
+\__cookingunits_culang_def_base:nnn { name } { one (m) } { \c__cookingunits_no_translation_str }
+\__cookingunits_culang_def_base:nnn { name } { one (f) } { \c__cookingunits_no_translation_str }
+\__cookingunits_culang_def_base:nnn { name } { one (n) } { \c__cookingunits_no_translation_str }
+\__cookingunits_culang_def_base:nnn { name-pl } { one (m) }  { \c__cookingunits_no_translation_str }
+\__cookingunits_culang_def_base:nnn { name-pl } { one (f) } { \c__cookingunits_no_translation_str }
+\__cookingunits_culang_def_base:nnn { name-pl } { one (n) } { \c__cookingunits_no_translation_str }
 \__cookingunits_culang_def_for:nnnn { English } { name } { one (m) } { one }
 \__cookingunits_culang_def_for:nnnn { English } { name } { one (f) } { one }
 \__cookingunits_culang_def_for:nnnn { English } { name } { one (n) } { one }
@@ -1606,7 +1609,7 @@
 \__cookingunits_culang_def_for:nnnn { German } { name } { one (f) } { eine }
 \__cookingunits_culang_def_for:nnnn { German } { name } { one (n) } { ein }
 \__cookingunits_culang_def_base:nnn { name } { cutext-range-sign } { -- }
-\__cookingunits_culang_def_base:nnn { name-pl } { cutext-range-sign } { \q__cookingunits_no_translation }
+\__cookingunits_culang_def_base:nnn { name-pl } { cutext-range-sign } { \c__cookingunits_no_translation_str }
 \__cookingunits_culang_def_for:nnnn { German } { name } { cutext-range-sign } { ~bis~ }
 \__cookingunits_culang_def_for:nnnn { English } { name } { cutext-range-sign } { ~to~ }
 \cs_new:Npn \__cookingunits_def_new_type:nnn #1#2#3
@@ -1618,16 +1621,18 @@
   }
 \cs_new:Npn \__cookingunits_def_new_type_aux:Nnn #1#2#3
   {
-    \cs_new:cpn { __cookingunits_set_ #2 _to:n } ##1
+    \cs_new_nopar:cpn { __cookingunits_set_ #2 _to:n } ##1
       {
-        \tl_if_exist:cF { c__cookingunits_#2_ ##1 _tl } { \tl_show:n { ERROR-set-#2-##1 } }
-        \tl_set_eq:Nc #1 { c__cookingunits_#2_ ##1 _tl }
+        \tl_if_exist:cF { c__cookingunits_#2_ ##1 _tl }
+          { \msg_error:nnn {cooking-units } { internal-error } { Type } { ERROR-set-#2-##1 } }
+         \tl_set_eq:Nc #1 { c__cookingunits_#2_ ##1 _tl }
       }
     \tl_if_empty:nF {#3}
       {
         \prg_new_conditional:cpnn { __cookingunits_if_ #2 _equal:n } ##1 {#3}
           {
-            \tl_if_exist:cF { c__cookingunits_#2_ ##1 _tl } { \tl_show:n { ERROR-check-#2-##1 } }
+            \tl_if_exist:cF { c__cookingunits_#2_ ##1 _tl }
+              { \msg_error:nnnn {cooking-units }  { internal-error } { Type-2 } { ERROR-set-#2-##1 } }
             \tl_if_eq:NcTF #1 { c__cookingunits_#2_ ##1 _tl }
               { \prg_return_true: }
               { \prg_return_false: }
@@ -1656,7 +1661,6 @@
     \cs_if_exist_use:c { exp_args:NN \l__cookingunits_expand_amount_tl }
     \__cookingunits_set_amount:Nn #1 {#2}
   }
-\bool_new:N \l__cookingunits_skip_first_part_bool
 \cs_new:Npn \__cookingunits_do_the_stuff:nnnnnn #1#2#3#4#5#6
   {
     \__cookingunits_initialice_accordingly:nnnn {#1} {#4} {#2} {#5}
@@ -1904,9 +1908,13 @@
 \cs_new:Npn \__cookingunits_new_print_unit_correctly:
   {
     \__cookingunits_if_state_equal:nTF { error }
-      { \__cookingunits_print_unit_in_case_of_error: }
       {
         \tl_case:NnF \l__cookingunits_cmd_type_tl
+          { \c__cookingunits_cmd_type_cuam_tl { } }
+          { \__cookingunits_print_unit_in_case_of_error: }
+      }
+      {
+        \tl_case:NnF \l__cookingunits_cmd_type_tl
           {
             \c__cookingunits_cmd_type_cunum_tl { \__cookingunits_cunum_print_correct_unit: }
             \c__cookingunits_cmd_type_cCutext_tl { \__cookingunits_cutext_print_correct_unitname: }
@@ -1989,12 +1997,12 @@
   }
 \cs_new:Npn \__cookingunits_create_internal_error:nN #1#2
   {
-    \__cookingunits_set_case_to:n { error }
+    \__cookingunits_set_state_to:n { error }
     \msg_error:nnnV { cooking-units } { internal-error } {#1} #2
   }
 \cs_new:Npn \__cookingunits_create_error:n #1
   {
-    \__cookingunits_set_case_to:n { error }
+    \__cookingunits_set_state_to:n { error }
     \msg_error:nnV { cooking-units } {#1} \l__cookingunits_original_amount_tl
   }
 \cs_new:Npn \__cookingunits_create_error_and_stop:n #1
@@ -2004,7 +2012,7 @@
   }
 \cs_new:Npn \__cookingunits_create_error:nn #1#2
   {
-    \__cookingunits_set_case_to:n { error }
+    \__cookingunits_set_state_to:n { error }
     \msg_error:nnnV { cooking-units } {#1} {#2} \l__cookingunits_original_amount_tl
   }
 \cs_new:Npn \__cookingunits_parse_the_amount:n #1
@@ -2449,8 +2457,8 @@
   }
 \cs_new:Npn \__cookingunits_cuam_post_process_input_phrases:NN #1#2
   {
-    \__cookingunits_culang_let:nnN { phrase } { phrase-prop } \l__cookingunits_phrase_prop
-    \tl_if_eq:NNT \q__cookingunits_no_translation \l__cookingunits_phrase_prop
+    \__cookingunits_culang_get_phrase_prop:N \l__cookingunits_phrase_prop
+    \tl_if_eq:NNT \c__cookingunits_no_translation_str \l__cookingunits_phrase_prop
       { \use_none_delimit_by_q_stop:w }
     \prop_get:NnN \l__cookingunits_phrase_prop { seq } \l__cookingunits_phrase_numbers_seq
     \__cookingunits_cuam_post_process_input_phrases_aux:NNN
@@ -2916,8 +2924,8 @@
 \cs_generate_variant:Nn \__cookingunits_set_cooking_unit:nnn { nnV }
 \cs_new:Npn \__cookingunits_set_cooking_unit_base_translation:n #1
   {
-    \__cookingunits_culang_def_base:nnn { name } {#1} \q__cookingunits_no_translation
-    \__cookingunits_culang_def_base:nnn { name-pl } {#1} \q__cookingunits_no_translation
+    \__cookingunits_culang_def_base:nnn { name } {#1} \c__cookingunits_no_translation_str
+    \__cookingunits_culang_def_base:nnn { name-pl } {#1} \c__cookingunits_no_translation_str
     \__cookingunits_culang_def_base:nnn { gender } {#1} { m }
   }
 \NewDocumentCommand \declarecookingderivatives { m m m m }
@@ -3142,9 +3150,12 @@
         \__cookingunits_error_if_unit_not_defined:nNT {#1} \l__cookingunits_curr_unit_tl
           { \__cookingunits_set_state_to:n { error } }
       }
-    \peek_meaning_ignore_spaces:NTF [
-      { \__cookingunits_parse_definename_optional_unitsymbol:w }
-      { \__cookingunits_parse_definename_singular:n }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF [
+          { \__cookingunits_parse_definename_optional_unitsymbol:w }
+          { \__cookingunits_parse_definename_singular:n }
+      }
   }
 \cs_new:Npn \__cookingunits_parse_definename_optional_unitsymbol:w [#1]
   {
@@ -3162,16 +3173,22 @@
     \quark_if_recursion_tail_stop_do:nn {#1}
       { \msg_error:nn { cooking-units } { missing-argument } }
     \prop_put:Nnn \l__cookingunits_tmpa_prop { name } {#1}
-    \peek_meaning_ignore_spaces:NTF [
-      { \__cookingunits_parse_definename_optional_plural:w }
-      { \__cookingunits_parse_definename_optional_plural:w [#1] }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF [
+          { \__cookingunits_parse_definename_optional_plural:w }
+          { \__cookingunits_parse_definename_optional_plural:w [#1] }
+      }
   }
 \cs_new:Npn \__cookingunits_parse_definename_optional_plural:w [#1]
   {
     \prop_put:Nnn \l__cookingunits_tmpa_prop { name-pl } {#1}
-    \peek_meaning_ignore_spaces:NTF <
-      { \__cookingunits_parse_definename_optional_gender:w  }
-      { \__cookingunits_parse_definename_optional_gender:w <m> }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF <
+          { \__cookingunits_parse_definename_optional_gender:w  }
+          { \__cookingunits_parse_definename_optional_gender:w <m> }
+      }
   }
 \cs_new:Npn \__cookingunits_parse_definename_optional_gender:w <#1>
   {
@@ -3212,7 +3229,21 @@
      {#1} {#2}
     \__cookingunits_cuprint_define_printed_unit:nn
   }
-\__cookingunits_culang_def_base:nnn { phrase } { phrase-prop } { \q__cookingunits_no_translation }
+\__cookingunits_culang_def_base:nnn { phrase } { phrase-prop } { \c__cookingunits_no_translation_str }
+\__cookingunits_culang_def_base:nnn { phrase } { phrase-lang } { Humphry-Drumphy }
+\cs_new:Npn \__cookingunits_culang_get_phrase_prop:N #1
+  {
+    \__cookingunits_culang_let:nnN { phrase } { phrase-lang } \l__cookingunits_language_tl
+    \prop_if_exist:cTF { l__cookingunits_ \l__cookingunits_language_tl _phrase_prop }
+      {
+        \prop_set_eq:Nc #1 { l__cookingunits_ \l__cookingunits_language_tl _phrase_prop }
+      }
+      { \tl_set_eq:NN #1 \c__cookingunits_no_translation_str  }
+  }
+\cs_new:Npn \__cookingunits_culang_get_phrase_prop_for:nN #1#2
+  {
+    \prop_set_eq:Nc #2 { l__cookingunits_ #1 _phrase_prop }
+  }
 \NewDocumentCommand \cudefinephrase { m m }
   {
     \__cookingunits_new_cuphrase_add:nn {#1} {#2}
@@ -3221,21 +3252,22 @@
   {
     \tl_set:Nn \l__cookingunits_language_tl {#1}
     \__cookingunits_culang_if_translation_exists_for:VnnTF \l__cookingunits_language_tl
-      { phrase } { phrase-prop }
+      { phrase } { phrase-lang }
       {
-        \__cookingunits_culang_let_for:VnnN \l__cookingunits_language_tl { phrase } { phrase-prop }
-          \l__cookingunits_phrase_prop
+        \prop_set_eq:Nc \l__cookingunits_phrase_prop { l__cookingunits_ \l__cookingunits_language_tl _phrase_prop }
         \prop_get:NnN \l__cookingunits_phrase_prop { seq } \l__cookingunits_phrase_numbers_seq
       }{
+        \prop_new:c { l__cookingunits_ \l__cookingunits_language_tl _phrase_prop }
         \prop_clear:N \l__cookingunits_phrase_prop
         \seq_clear:N \l__cookingunits_phrase_numbers_seq
       }
-      \__cookingunits_sanitize_arrows:n {#2}
-      \__cookingunits_parse_phrase:V \l__cookingunits_sanitise_tl
-      \__cookingunits_new_cuphrase_sort_sequence:N \l__cookingunits_phrase_numbers_seq
-      \prop_put:NnV \l__cookingunits_phrase_prop { seq } \l__cookingunits_phrase_numbers_seq
-      \__cookingunits_culang_def_for:VnnV
-        \l__cookingunits_language_tl { phrase } { phrase-prop } \l__cookingunits_phrase_prop
+    \__cookingunits_sanitize_arrows:n {#2}
+    \__cookingunits_parse_phrase:V \l__cookingunits_sanitise_tl
+    \__cookingunits_new_cuphrase_sort_sequence:N \l__cookingunits_phrase_numbers_seq
+    \prop_put:NnV \l__cookingunits_phrase_prop { seq } \l__cookingunits_phrase_numbers_seq
+    \prop_set_eq:cN { l__cookingunits_ \l__cookingunits_language_tl _phrase_prop } \l__cookingunits_phrase_prop
+    \__cookingunits_culang_def_for:VnnV
+      \l__cookingunits_language_tl { phrase } { phrase-lang } \l__cookingunits_language_tl
   }
 \cs_new:Npn \__cookingunits_parse_phrase:n #1
   {
@@ -3278,16 +3310,22 @@
   }
 \cs_new:Npn \__cookingunits_parse_phrase_optionals:n #1
   {
-    \peek_meaning_ignore_spaces:NTF [
-      { \__cookingunits_parse_stuff_plural:w }
-      { \__cookingunits_parse_stuff_plural:w [#1] }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF [
+          { \__cookingunits_parse_stuff_plural:w }
+          { \__cookingunits_parse_stuff_plural:w [#1] }
+      }
   }
 \cs_new:Npn \__cookingunits_parse_stuff_plural:w [#1]
   {
     \prop_put:Nnn \l__cookingunits_tmpa_prop { -pl } {#1}
-    \peek_meaning_ignore_spaces:NTF <
-      { \__cookingunits_parse_stuff_gender:w }
-      { \__cookingunits_parse_stuff_gender:w  <m> }
+    \peek_remove_spaces:n
+      {
+        \peek_meaning:NTF <
+          { \__cookingunits_parse_stuff_gender:w }
+          { \__cookingunits_parse_stuff_gender:w  <m> }
+      }
   }
 \cs_new:Npn \__cookingunits_parse_stuff_gender:w <#1>
   {



More information about the tex-live-commits mailing list.