Commit ac01c373 authored by Vladimír Štill's avatar Vladimír Štill
Browse files

Add support for english reports

parent c355fdb7
......@@ -5,6 +5,8 @@
% in the project's repository at https://gitlab.fi.muni.cz/xukrop/fi-thesis-report/
\ProvidesClass{fi-thesis-report}[2017/06/09 v1.2 FI thesis report template]
\newcommand{\ftr@lang}{czech}
\DeclareOption{english}{\renewcommand{\ftr@lang}{english}}
% Based on 'article'
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions \relax
......@@ -19,7 +21,7 @@
\RequirePackage[a4paper, top=30mm, bottom=35mm, left=30mm, right=30mm]{geometry}
\RequirePackage[final,kerning=true,spacing=true]{microtype}
\microtypecontext{spacing=nonfrench}
\RequirePackage[czech]{babel}
\RequirePackage[\ftr@lang]{babel}
\RequirePackage{color}
\RequirePackage{graphicx}
\RequirePackage{tabularx}
......@@ -61,7 +63,11 @@
}
\newcommand{\setSignature}[1]{\def\@signature{#1}}
% Helper for translation
\newcommand{\ftr@ite@czech}[2]{\ifthenelse{\equal{\ftr@lang}{czech}}{#1}{#2}}
% Determine correct title texts
\ftr@ite@czech{
\def\@titleFirst{Posudek
\ifthenelse{\equal{\@reportType}{inter-reader}}{interního oponenta}{
\ifthenelse{\equal{\@reportType}{reader}}{oponenta}{vedoucího}}
......@@ -70,6 +76,17 @@
\ifthenelse{\equal{\@thesisType}{phd}}{disertační}{%
\ifthenelse{\equal{\@thesisType}{bc}}{bakalářské}{diplomové}%
} práce}
}{
\def\@titleFirst{
\ifthenelse{\equal{\@thesisType}{phd}}{Disertation}{%
\ifthenelse{\equal{\@thesisType}{bc}}{Bachelor}{Master}%
} Thesis}
\def\@titleSecond{
\ifthenelse{\equal{\@reportType}{inter-reader}}{Internal}{
\ifthenelse{\equal{\@reportType}{reader}}{Reader's}{Supervisor's}
} Review}
}
% Document header (logo + table with names)
\AtBeginDocument{
......@@ -90,12 +107,12 @@
\noindent
{\def\arraystretch{1.3}\tabcolsep=10pt
\begin{tabularx}{\textwidth}{@{} l >{\it} X @{}}
Název práce: & \@thesisName \\
Autor práce: & \@student
\ifthenelse{\isundefined{\@supervisor}}{}{\\Vedoucí práce: & \@supervisor}%
\ftr@ite@czech{Název práce}{Title}: & \@thesisName \\
\ftr@ite@czech{Autor práce}{Author}: & \@student
\ifthenelse{\isundefined{\@supervisor}}{}{\\\ftr@ite@czech{Vedoucí práce}{Supervisor}: & \@supervisor}%
\ifthenelse{\isundefined{\@consultant}}{}{\\Konzultant: & \@consultant}%
\ifthenelse{\isundefined{\@reader}}{}{\\Oponent: & \@reader}%
\ifthenelse{\isundefined{\@interReader}}{}{\\Interní oponent: & \@interReader}%
\ifthenelse{\isundefined{\@reader}}{}{\\\ftr@ite@czech{Oponent}{Reader}: & \@reader}%
\ifthenelse{\isundefined{\@interReader}}{}{\\\ftr@ite@czech{Interní oponent}{Internal Reader}: & \@interReader}%
\end{tabularx}
}
\vspace{-0.5em}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment