-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Swedish localization (preliminary)
See #35
- Loading branch information
Showing
7 changed files
with
993 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ env: | |
babel-dutch | ||
babel-italian | ||
babel-russian | ||
babel-swedish | ||
beamer | ||
bookmark | ||
booktabs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,290 @@ | ||
\documentclass{book} | ||
|
||
\input{regression-test} | ||
|
||
\ExplSyntaxOn | ||
\debug_on:n { check-declarations , deprecation } | ||
\ExplSyntaxOff | ||
|
||
\usepackage[swedish]{babel} | ||
|
||
\usepackage{zref-clever} | ||
|
||
% This file is intended to test the swedish language file. | ||
\ExplSyntaxOn | ||
\tl_new:N \g__test_tmpa_tl | ||
\seq_new:N \g__test_tmpa_seq | ||
\tl_gset:Nn \g__test_tmpa_tl { swedish } % base language | ||
\seq_gset_from_clist:Nn \g__test_tmpa_seq % all aliases, including base | ||
{ | ||
swedish , | ||
} | ||
\ExplSyntaxOff | ||
|
||
\begin{document} | ||
|
||
\START | ||
|
||
\ExplSyntaxOn | ||
|
||
\TEST { Language~declaration } | ||
{ | ||
\seq_map_inline:Nn \g__test_tmpa_seq | ||
{ | ||
\tl_show:c { \__zrefclever_language_varname:n {#1} } | ||
} | ||
\seq_if_exist:cT | ||
{ \__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { variants } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { variants } { seq } | ||
} | ||
} | ||
\seq_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { gender } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { gender } { seq } | ||
} | ||
} | ||
\bool_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { allcaps } { bool } | ||
} | ||
{ | ||
\bool_show:c | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { allcaps } { bool } | ||
} | ||
} | ||
} | ||
|
||
|
||
\TEST { Language~file~options } | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
namesep , | ||
pairsep , | ||
listsep , | ||
lastsep , | ||
tpairsep , | ||
tlistsep , | ||
tlastsep , | ||
notesep , | ||
rangesep , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_default:enn | ||
{ \g__test_tmpa_tl } { #1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_default:enn | ||
{ \g__test_tmpa_tl } { #1 } { tl } | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
book , | ||
part , | ||
chapter , | ||
section , | ||
paragraph , | ||
appendix , | ||
page , | ||
line , | ||
figure , | ||
table , | ||
item , | ||
footnote , | ||
endnote , | ||
note , | ||
equation , | ||
theorem , | ||
lemma , | ||
corollary , | ||
proposition , | ||
definition , | ||
proof , | ||
result , | ||
remark , | ||
example , | ||
algorithm , | ||
listing , | ||
exercise , | ||
solution , | ||
} | ||
{ | ||
\seq_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { gender } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { gender } { seq } | ||
} | ||
} | ||
\seq_if_exist:cTF | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { variants } { seq } | ||
} | ||
{ | ||
\seq_map_inline:cn | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { variants } { seq } | ||
} | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
Name-sg , | ||
name-sg , | ||
Name-pl , | ||
name-pl , | ||
Name-sg-ab , | ||
name-sg-ab , | ||
Name-pl-ab , | ||
name-pl-ab , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } | ||
{ #1 } { ##1 - ####1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } | ||
{ #1 } { ##1 - ####1 } { tl } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
Name-sg , | ||
name-sg , | ||
Name-pl , | ||
name-pl , | ||
Name-sg-ab , | ||
name-sg-ab , | ||
Name-pl-ab , | ||
name-pl-ab , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
rangesep , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
rangetopair , | ||
} | ||
{ | ||
\bool_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { bool } | ||
} | ||
{ | ||
\bool_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { bool } | ||
} | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
equation , | ||
} | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
refbounds-first , | ||
refbounds-first-sg , | ||
refbounds-first-pb , | ||
refbounds-first-rb , | ||
refbounds-mid , | ||
refbounds-mid-rb , | ||
refbounds-mid-re , | ||
refbounds-last , | ||
refbounds-last-pe , | ||
refbounds-last-re , | ||
} | ||
{ | ||
\seq_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { seq } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
\ExplSyntaxOff | ||
|
||
\OMIT | ||
|
||
\end{document} |
Oops, something went wrong.