% --------------------------------------------------------------------------
% - the CHEMMACROS bundle
% - ghsystem_langtemplate.def
% - loads of little helpers for chemists
% --------------------------------------------------------------------------
% - Clemens Niederberger
% --------------------------------------------------------------------------
% - https://bitbucket.org/cgnieder/chemmacros/
% - contact@mychemistry.eu
% --------------------------------------------------------------------------
% - If you have any ideas, questions, suggestions or bugs to report, please
% - feel free to contact me.
% --------------------------------------------------------------------------
% - Copyright 2011-2016 Clemens Niederberger
% -
% - This work may be distributed and/or modified under the
% - conditions of the LaTeX Project Public License, either version 1.3
% - of this license or (at your option) any later version.
% - The latest version of this license is in
% -   http://www.latex-project.org/lppl.txt
% - and version 1.3 or later is part of all distributions of LaTeX
% - version 2005/12/01 or later.
% -
% - This work has the LPPL maintenance status `maintained'.
% -
% - The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
%
% Some information how to use this template:
%
% The H, EUH, and P statements are stored in a property list, respectively.
% The commands for adding a respective entry are pre-typed so you only have to
% fill in the missing text.
% The commands are in a logical order (first H then EUH then P, numbers
% increasing) and have hints where to find the corresponding statements in the
% EU regulation 1272/2008.
% You will notice that some of the gaps are pre-filled with commands like
% `\ghsystem_exposure:'. These commands are called “fill-in functions” and put a
% corresponding replacement text in their position depending on package options
% used. They should _not_ be replaced but be in the corresponding position in
% statement where the replacement text should appear.
%
% You need to know:
% - every gap that is to be filled is indicated be three dots: ...
% - you need to take care of special symbols such as ä replaced with \"{a} etc.
%   so the statements can be used with latex, pdflatex, xelatex, and lualatex as
%   well
% - for the fill-in functions the original English text is given to help you
%   identify the right one
%
% You may find it helpful to have a look at existing language files. You'll find
% them in the directory of chemmacros in your TeX installation in a
% sub-directory called `language'.
%
% To test your language file you have to name it
%   \ghsystem_<language name>.def
% for example by replacing `langtemplate' in the name of this file.  You now
% can use it with
%   \chemsetup[ghsystem]{language=<language name>}
% I suggest running a test file similar to this:
% -----------------------------------------------------------------------------
% \documentclass{article}
% \usepackage{ghsystem}
% \begin{document}
%
% \loadghsystemlanguage{<language name>}
% \ghslistall
% 
% \end{document}
% -----------------------------------------------------------------------------
%
% <LANGUAGE> DEFINITIONS
\ghsystemlanguagefile{language}{date}

% table head:
\tl_set:Nn \l_ghsystem_identifier_tl { ... }
\tl_set:Nn \l_ghsystem_table_text_tl { ... }
\tl_set:Nn \l_ghsystem_table_caption_tl { ... }

% fill-in functions:
% <state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard>.
\cs_set:Npn \ghsystem_exposure:
  {
    \bool_if:NT \l_ghsystem_fill_in_bool
      {
        \c_space_tl \ghsystem_filler:n { ... }
      }
  }

%  <state specific effect if known> 
\cs_set:Npn \ghsystem_effect:
  {
    \bool_if:NT \l_ghsystem_fill_in_bool
      {
        \c_space_tl \ghsystem_filler:n { ... }
      }
  }

% <or state all organs affected, if known>
\cs_set:Npn \ghsystem_organs:
  {
    \bool_if:nT { \l_ghsystem_fill_in_bool && !\l_ghsystem_organs_bool }
      {
        \c_space_tl \ghsystem_filler:n { ... }
      }
  }

% <name of sensitising substance>
\cs_set:Npn \ghsystem_substance:
  {
    \bool_if:NF \l_ghsystem_substance_bool
      {
        \c_space_tl \ghsystem_filler:n { ... }
      }
  }

% HAZARD STATEMENTS (Annex 3)
% 1. Hazard Statements
% 1.1 Physical Hazards
\ghsystem_add_statement:nnn {H} {200} {...}
\ghsystem_add_statement:nnn {H} {201} {...}
\ghsystem_add_statement:nnn {H} {202} {...}
\ghsystem_add_statement:nnn {H} {203} {...}
\ghsystem_add_statement:nnn {H} {204} {...}
\ghsystem_add_statement:nnn {H} {205} {...}
\ghsystem_add_statement:nnn {H} {220} {...}
\ghsystem_add_statement:nnn {H} {221} {...}
\ghsystem_add_statement:nnn {H} {222} {...}
\ghsystem_add_statement:nnn {H} {223} {...}
\ghsystem_add_statement:nnn {H} {224} {...}
\ghsystem_add_statement:nnn {H} {225} {...}
\ghsystem_add_statement:nnn {H} {226} {...}
\ghsystem_add_statement:nnn {H} {228} {...}
\ghsystem_add_statement:nnn {H} {240} {...}
\ghsystem_add_statement:nnn {H} {241} {...}
\ghsystem_add_statement:nnn {H} {242} {...}
\ghsystem_add_statement:nnn {H} {250} {...}
\ghsystem_add_statement:nnn {H} {251} {...}
\ghsystem_add_statement:nnn {H} {252} {...}
\ghsystem_add_statement:nnn {H} {260} {...}
\ghsystem_add_statement:nnn {H} {261} {...}
\ghsystem_add_statement:nnn {H} {270} {...}
\ghsystem_add_statement:nnn {H} {271} {...}
\ghsystem_add_statement:nnn {H} {272} {...}
\ghsystem_add_statement:nnn {H} {280} {...}
\ghsystem_add_statement:nnn {H} {281} {...}
\ghsystem_add_statement:nnn {H} {290} {...}

% 1.2 Health Hazards
\ghsystem_add_statement:nnn {H} {300} {...}
\ghsystem_add_statement:nnn {H} {301} {...}
\ghsystem_add_statement:nnn {H} {302} {...}
\ghsystem_add_statement:nnn {H} {304} {...}
\ghsystem_add_statement:nnn {H} {310} {...}
\ghsystem_add_statement:nnn {H} {311} {...}
\ghsystem_add_statement:nnn {H} {312} {...}
\ghsystem_add_statement:nnn {H} {314} {...}
\ghsystem_add_statement:nnn {H} {315} {...}
\ghsystem_add_statement:nnn {H} {317} {...}
\ghsystem_add_statement:nnn {H} {318} {...}
\ghsystem_add_statement:nnn {H} {319} {...}
\ghsystem_add_statement:nnn {H} {330} {...}
\ghsystem_add_statement:nnn {H} {331} {...}
\ghsystem_add_statement:nnn {H} {332} {...}
\ghsystem_add_statement:nnn {H} {334} {...}
\ghsystem_add_statement:nnn {H} {335} {...}
\ghsystem_add_statement:nnn {H} {336} {...}
\ghsystem_add_statement:nnn {H} {340} {... \ghsystem_exposure:}
\ghsystem_add_statement:nnn {H} {341} {... \ghsystem_exposure:}
\ghsystem_add_statement:nnn {H} {350} {... \ghsystem_exposure:}
\ghsystem_add_statement:nnn {H} {351} {... \ghsystem_exposure:}
\ghsystem_add_statement:nnn {H} {360} {... \ghsystem_effect: \ghsystem_exposure:}
\ghsystem_add_statement:nnn {H} {361} {... \ghsystem_effect: \ghsystem_exposure:}
\ghsystem_add_statement:nnn {H} {362} {...}
\ghsystem_add_statement:nnn {H} {370}
  {
    ... \bool_if:NF \l_ghsystem_organs_bool {...} \ghsystem_organs:
    . \ghsystem_exposure:
 }
\ghsystem_add_statement:nnn {H} {371}
  {
    ... \bool_if:NF \l_ghsystem_organs_bool {...} \ghsystem_organs:
    \ghsystem_exposure:
 }
\ghsystem_add_statement:nnn {H} {372}
  {
    ... \bool_if:NF \l_ghsystem_organs_bool {...} \ghsystem_organs:\
    ... \ghsystem_exposure:
 }
\ghsystem_add_statement:nnn {H} {373}
  {
    ... \bool_if:NF \l_ghsystem_organs_bool {...} \ghsystem_organs:\
    ... \ghsystem_exposure:
 }

% 1.3 Environmental hazards
\ghsystem_add_statement:nnn {H} {400} {...}
\ghsystem_add_statement:nnn {H} {410} {...}
\ghsystem_add_statement:nnn {H} {411} {...}
\ghsystem_add_statement:nnn {H} {412} {...}
\ghsystem_add_statement:nnn {H} {413} {...}

% 2 Supplemental Hazard Informations
% 2.1 Physical Properties
\ghsystem_add_statement:nnn {EUH} {001} {...}
\ghsystem_add_statement:nnn {EUH} {006} {...}
\ghsystem_add_statement:nnn {EUH} {014} {...}
\ghsystem_add_statement:nnn {EUH} {018} {...}
\ghsystem_add_statement:nnn {EUH} {019} {...}
\ghsystem_add_statement:nnn {EUH} {044} {...}

% 2.2 Health Properties
\ghsystem_add_statement:nnn {EUH} {029} {...}
\ghsystem_add_statement:nnn {EUH} {031} {...}
\ghsystem_add_statement:nnn {EUH} {032} {...}
\ghsystem_add_statement:nnn {EUH} {066} {...}
\ghsystem_add_statement:nnn {EUH} {070} {...}
\ghsystem_add_statement:nnn {EUH} {071} {...}

% 2.3 Environmental Properties
\ghsystem_add_statement:nnn {EUH} {059} {...}

% 2.4 Supplemental Label Elements/Information On Certain Substances And Mixtures
\ghsystem_add_statement:nnn {EUH} {201} {...}
\ghsystem_add_statement:nnn {EUH} {201A} {...}
\ghsystem_add_statement:nnn {EUH} {202} {\iupac {...} . ~ ...}
\ghsystem_add_statement:nnn {EUH} {203} {... ~ ... \,(VI) . ~ ...}
\ghsystem_add_statement:nnn {EUH} {204} {... ~ \iupac {...} . ~ ...}
\ghsystem_add_statement:nnn {EUH} {205} {...}
\ghsystem_add_statement:nnn {EUH} {206} {...}
\ghsystem_add_statement:nnn {EUH} {207} {...}
\ghsystem_add_statement:nnn {EUH} {208} {... \ghsystem_substance: . ~ ...}
\ghsystem_add_statement:nnn {EUH} {209} {...}
\ghsystem_add_statement:nnn {EUH} {209A} {...}
\ghsystem_add_statement:nnn {EUH} {210} {...}
\ghsystem_add_statement:nnn {EUH} {401} {...}

% PRECAUTIONARY STATEMENTS (Annex 4 page 19ff)
% 3 Precautionary Statements
% 3.1 General
\ghsystem_add_statement:nnn {P} {101} {...}
\ghsystem_add_statement:nnn {P} {102} {...}
\ghsystem_add_statement:nnn {P} {103} {...}

% 3.2 Precautionary Statements — Prevention
\ghsystem_add_statement:nnn {P} {201} {...}
\ghsystem_add_statement:nnn {P} {202} {...}
\ghsystem_add_statement:nnn {P} {210} {...}
\ghsystem_add_statement:nnn {P} {211} {...}
\ghsystem_add_statement:nnn {P} {220}
  {... \ghsystem_slash: \l_ghsystem_dots_tl \ghsystem_slash: ...}
\ghsystem_add_statement:nnn {P} {221} {... \l_ghsystem_dots_tl}
\ghsystem_add_statement:nnn {P} {222} {...}
\ghsystem_add_statement:nnn {P} {223} {...}
\ghsystem_add_statement:nnn {P} {230} {... ~ \l_ghsystem_dots_tl}
\ghsystem_add_statement:nnn {P} {231} {...}
\ghsystem_add_statement:nnn {P} {232} {...}
\ghsystem_add_statement:nnn {P} {233} {...}
\ghsystem_add_statement:nnn {P} {234} {...}
\ghsystem_add_statement:nnn {P} {235} {...}
\ghsystem_add_statement:nnn {P} {240} {...}
\ghsystem_add_statement:nnn {P} {241}
  {... \ghsystem_slash: \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {242} {...}
\ghsystem_add_statement:nnn {P} {243} {...}
\ghsystem_add_statement:nnn {P} {244} {...}
\ghsystem_add_statement:nnn {P} {250}
  {... \ghsystem_slash: \l_ghsystem_dots_tl \ghsystem_slash: ...}
\ghsystem_add_statement:nnn {P} {251} {...}
\ghsystem_add_statement:nnn {P} {260} {...}
\ghsystem_add_statement:nnn {P} {261} {...}
\ghsystem_add_statement:nnn {P} {262} {...}
\ghsystem_add_statement:nnn {P} {263} {...}
\ghsystem_add_statement:nnn {P} {264} {... ~ \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {270} {...}
\ghsystem_add_statement:nnn {P} {271} {...}
\ghsystem_add_statement:nnn {P} {272} {...}
\ghsystem_add_statement:nnn {P} {273} {...}
\ghsystem_add_statement:nnn {P} {280} {...}
\ghsystem_add_statement:nnn {P} {281} {...}
\ghsystem_add_statement:nnn {P} {282} {...}
\ghsystem_add_statement:nnn {P} {283} {...}
\ghsystem_add_statement:nnn {P} {284} {...}
\ghsystem_add_statement:nnn {P} {285} {...}
\ghsystem_add_statement:nnn {P} {231 + 231} {...}
\ghsystem_add_statement:nnn {P} {235 + 410} {...}

% 3.3 Precautionary Statements — Response
\ghsystem_add_statement:nnn {P} {301} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {302} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {303} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {304} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {305} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {306} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {307} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {308} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {309} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {310} {...}
\ghsystem_add_statement:nnn {P} {311} {...}
\ghsystem_add_statement:nnn {P} {312} {...}
\ghsystem_add_statement:nnn {P} {313} {...}
\ghsystem_add_statement:nnn {P} {314} {...}
\ghsystem_add_statement:nnn {P} {315} {...}
\ghsystem_add_statement:nnn {P} {320} {... ~ \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {321} {... ~ \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {322} {... ~ \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {330} {...}
\ghsystem_add_statement:nnn {P} {331} {...}
\ghsystem_add_statement:nnn {P} {332} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {333} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {334} {...}
\ghsystem_add_statement:nnn {P} {335} {...}
\ghsystem_add_statement:nnn {P} {336} {...}
\ghsystem_add_statement:nnn {P} {337} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {338} {...}
\ghsystem_add_statement:nnn {P} {340} {...}
\ghsystem_add_statement:nnn {P} {341} {...}
\ghsystem_add_statement:nnn {P} {342} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {350} {...}
\ghsystem_add_statement:nnn {P} {351} {...}
\ghsystem_add_statement:nnn {P} {352} {...}
\ghsystem_add_statement:nnn {P} {353} {...}
\ghsystem_add_statement:nnn {P} {360} {...}
\ghsystem_add_statement:nnn {P} {361} {...}
\ghsystem_add_statement:nnn {P} {362} {...}
\ghsystem_add_statement:nnn {P} {363} {...}
\ghsystem_add_statement:nnn {P} {370} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {371} {... : \ghsystem_text:}
\ghsystem_add_statement:nnn {P} {372} {...}
\ghsystem_add_statement:nnn {P} {373} {...}
\ghsystem_add_statement:nnn {P} {374} {...}
\ghsystem_add_statement:nnn {P} {375} {...}
\ghsystem_add_statement:nnn {P} {376} {...}
\ghsystem_add_statement:nnn {P} {377} {... : \ghsystem_text:\ ...}
\ghsystem_add_statement:nnn {P} {378} {\l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {380} {...}
\ghsystem_add_statement:nnn {P} {381} {...}
\ghsystem_add_statement:nnn {P} {390} {...}
\ghsystem_add_statement:nnn {P} {391} {...}
\ghsystem_add_statement:nnn {P} {301 + 310} {...}
\ghsystem_add_statement:nnn {P} {301 + 312} {...}
\ghsystem_add_statement:nnn {P} {301 + 330 + 331} {...}
\ghsystem_add_statement:nnn {P} {302 + 334} {...}
\ghsystem_add_statement:nnn {P} {302 + 350} {...}
\ghsystem_add_statement:nnn {P} {302 + 352} {...}
\ghsystem_add_statement:nnn {P} {303 + 361 + 353} {...}
\ghsystem_add_statement:nnn {P} {304 + 340} {...}
\ghsystem_add_statement:nnn {P} {304 + 341} {...}
\ghsystem_add_statement:nnn {P} {305 + 351 + 338} {...}
\ghsystem_add_statement:nnn {P} {306 + 360} {...}
\ghsystem_add_statement:nnn {P} {307 + 311} {...}
\ghsystem_add_statement:nnn {P} {308 + 313} {...}
\ghsystem_add_statement:nnn {P} {309 + 311} {...}
\ghsystem_add_statement:nnn {P} {332 + 313} {...}
\ghsystem_add_statement:nnn {P} {333 + 313} {...}
\ghsystem_add_statement:nnn {P} {335 + 334} {...}
\ghsystem_add_statement:nnn {P} {337 + 313} {...}
\ghsystem_add_statement:nnn {P} {342 + 311} {...}
\ghsystem_add_statement:nnn {P} {370 + 376} {...}
\ghsystem_add_statement:nnn {P} {370 + 378} {... ~ \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {370 + 380} {...}
\ghsystem_add_statement:nnn {P} {370 + 380 + 375} {...}
\ghsystem_add_statement:nnn {P} {371 + 380 + 375} {...}

% 3.4 Precautionary Statements — Storage
\ghsystem_add_statement:nnn {P} {401} {\l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {402} {...}
\ghsystem_add_statement:nnn {P} {403} {...}
\ghsystem_add_statement:nnn {P} {404} {...}
\ghsystem_add_statement:nnn {P} {405} {...}
\ghsystem_add_statement:nnn {P} {406}
  {... \ghsystem_slash: \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {407} {...}
\ghsystem_add_statement:nnn {P} {410} {...}
\ghsystem_add_statement:nnn {P} {411}
  {
    ... ~ \exp_args:No \SI {\l_ghsystem_celsius_temperature_tl}
    {\GHScelsius} \ghsystem_slash: \exp_args:No \SI
    {\l_ghsystem_fahrenheit_temperature_tl} {\GHSfahrenheit} ~ ...
 }
\ghsystem_add_statement:nnn {P} {412}
  {
    ... ~ \SI {50} {\GHScelsius} \ghsystem_slash: \SI {122} {
      \GHSfahrenheit} ~ ...
 }
\ghsystem_add_statement:nnn {P} {413}
  {
    ... ~ \exp_args:No \SI {\l_ghsystem_kg_mass_tl} {\GHSkilogram} ~
    ... ~ \SI {\l_ghsystem_celsius_temperature_tl} {\GHScelsius}
    \ghsystem_slash: \exp_args:No \SI {\l_ghsystem_fahrenheit_temperature_tl
   } {\GHSfahrenheit} ~ ...
 }
\ghsystem_add_statement:nnn {P} {420} {...}
\ghsystem_add_statement:nnn {P} {422} {... ~ \l_ghsystem_dots_tl\ ...}
\ghsystem_add_statement:nnn {P} {402 + 404} {...}
\ghsystem_add_statement:nnn {P} {403 + 233} {...}
\ghsystem_add_statement:nnn {P} {403 + 235} {...}
\ghsystem_add_statement:nnn {P} {410 + 403} {...}
\ghsystem_add_statement:nnn {P} {410 + 412}
  {
    ... ~ \SI {50} {\GHScelsius} \ghsystem_slash: \SI {122} {
      \GHSfahrenheit} ~ ...
 }
\ghsystem_add_statement:nnn {P} {411 + 235}
  {
    ... ~ \exp_args:No \SI {\l_ghsystem_celsius_temperature_tl}{
      \GHScelsius} \ghsystem_slash: \exp_args:No \SI {
      \l_ghsystem_fahrenheit_temperature_tl} {\GHSfahrenheit} ~ ...
 }

% 3.5 Precautionary Statements — Disposal
\ghsystem_add_statement:nnn {P} {501} {... ~ \l_ghsystem_dots_tl\ ...}

% 4 Hazard Statement Codes (Annex 6 page 4f)
\ghsystem_add_statement:nnn {H} {350i} {...}
\ghsystem_add_statement:nnn {H} {360F} {...}
\ghsystem_add_statement:nnn {H} {360D} {...}
\ghsystem_add_statement:nnn {H} {361f} {...}
\ghsystem_add_statement:nnn {H} {361d} {...}
\ghsystem_add_statement:nnn {H} {360FD} {...}
\ghsystem_add_statement:nnn {H} {361fd} {...}
\ghsystem_add_statement:nnn {H} {360Fd} {...}
\ghsystem_add_statement:nnn {H} {360Df} {...}

