Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization for as many languages as possible #1474

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions classes/book.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ function class:registerCommands ()
end
local lang = SILE.settings:get("document.language")
if SU.boolean(options.numbering, true) then
if options.prenumber then
if SILE.Commands[options.prenumber .. ":" .. lang] then
options.prenumber = options.prenumber .. ":" .. lang
end
SILE.call(options.prenumber)
if options.template then
SILE.call("fluent", { number = number }, { options.template })
else
SILE.call("show-multilevel-counter", { id = "sectioning" })
end
SILE.call("show-multilevel-counter", { id = "sectioning" })
if options.postnumber then
if SILE.Commands[options.postnumber .. ":" .. lang] then
options.postnumber = options.postnumber .. ":" .. lang
Expand All @@ -122,12 +120,7 @@ function class:registerCommands ()
end
end)

self:registerCommand("book:chapter:pre", function (_, _)
SILE.call("fluent", {}, { "book-chapter-title-pre" })
end)

self:registerCommand("book:chapter:post", function (_, _)
SILE.call("fluent", {}, { "book-chapter-post" })
SILE.call("par")
end)

Expand Down Expand Up @@ -157,7 +150,7 @@ function class:registerCommands ()
numbering = options.numbering,
toc = options.toc,
level = 1,
prenumber = "book:chapter:pre",
template = "chapter-template",
postnumber = "book:chapter:post"
}, content)
end)
Expand Down
2 changes: 1 addition & 1 deletion documentation/c08-language.sil
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ A particularly common string to override might be the table of contents heading:

\begin{verbatim}
\line
\\ftl\{toc-heading = Table of Contents\}
\\ftl\{tableofcontents = Table of Contents\}
\\tableofcontents
\line
\end{verbatim}
Expand Down
20 changes: 20 additions & 0 deletions i18n/af.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
figure = Figuur
table = Tabel
proof = Bewys
tableofcontents-title = Inhoudsopgawe
index = Inhoud
listoffigures = Lys van figure
listoftables = Lys van tabelle
abstract = Samevatting
bibliography = Bibliografie
preface = Voorwoord
references = Verwysings
page = Bladsy
see = sien
see-also = sien ook
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Bylae { $number }
book-chapter-title = Hoofstuk { $number }
part-template = Deel { $number }
20 changes: 20 additions & 0 deletions i18n/am.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
figure = ሥዕል
table = ሰንጠረዥ
proof = ማረጋገጫ
tableofcontents-title = ይዘት
index = ምህጻር ቃል
listoffigures = የሥዕችሎ ማውጫ
listoftables = የሰንጠዥረ ማውጫ
abstract = አኅጽተሮ ጽሁፍ
bibliography = ቢዋ መጽሃፍት
preface = መቅድም
references = የነሥ ጹሁፍ ምንጭ
page = ገጽ
see = ይመልከቱ
see-also = ይህምን ይመልከቱ
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = መድበል { $number }
book-chapter-title = ክፍል { $number }
part-template = ንዑስ ክፍል { $number }
21 changes: 21 additions & 0 deletions i18n/ar.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = شكل
table = جدول
proof = برهان
tableofcontents-title = المحتويات
index = الفهرس
listoffigures = قائمة الأشكال
listoftables = قائمة الجداول
abstract = ملخص
bibliography = المصادر
glossary = قاموس
preface = مدخل
references = المراجع
page = صفحة
see = راجع
see-also = راجع أيضًا
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = الملاحق { $number }
book-chapter-title = باب { $number }
part-template = القسم { $number }
21 changes: 21 additions & 0 deletions i18n/as.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = চিত্ৰ
table = তালিকা
proof = প্ৰমাণ
tableofcontents-title = সমল
index = বিষয়সূচী
listoffigures = চিত্ৰসূচী
listoftables = তালিকাসূচী
abstract = মূলভাৱ
bibliography = তথ্যসূত্ৰ
glossary = অৰ্থকোষ
preface = পাতনি
references = প্ৰসংগ
page = পৃষ্ঠা
see = চাওক
see-also = ও
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = পৰিশিষ্ট { $number }
book-chapter-title = অধ্যায় { $number }
part-template = অংশ { $number }
21 changes: 21 additions & 0 deletions i18n/bg.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = Фигура
table = Таблица
proof = Доказателство
tableofcontents-title = Съдържание
index = Азбучен указател
listoffigures = Списък на фигурите
listoftables = Списък на таблиците
abstract = Абстракт
bibliography = Библиография
glossary = Притурка
preface = Предговор
references = Литература
page = Стр.
see = вж.
see-also = вж. също и
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Приложение { $number }
book-chapter-title = Глава { $number }
part-template = Част { $number }
21 changes: 21 additions & 0 deletions i18n/bn.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = ছবি/নকশা
table = সারনী
proof = প্রমাণ
tableofcontents-title = সূচীপত্র
index = সূচক/নির্দেশক
listoffigures = ছবি/নকশা সমূহের তালিকা
listoftables = তালিকাসারণী
abstract = সারসংক্ষেপ
bibliography = তথ্যবিবরণ
glossary = পরিভাষার শব্দসম্ভার
preface = পূর্বকথা
references = তথ্যসুত্রসমূহ
page = পৃষ্ঠা
see = দেখুন
see-also = আরও দেখুন
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = পরিশিষ্ট { $number }
book-chapter-title = অধ্যায় { $number }
part-template = খন্ড { $number }
16 changes: 16 additions & 0 deletions i18n/bo.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
figure = པར་རིས་
table = རེའུ་མིག་
proof = བདེན་དཔང་།
tableofcontents-title = དཀར་ཆག།
index = གསུལ་བྱང་།
abstract = གནད་བསྡུས།
bibliography = དཔེ་ཆའི་ཐོ་གཞུང་།
glossary = མིང་ཚིག་རེའུ་མིག།
preface = དཔེ་དེབ་ཀྱི་གླེང་བརྗོད།
page = ཤོག་
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = ཞར་བྱུང་། { $number }
book-chapter-title = ལེའུ་ { $number }
part-template = ཆ་ཤས་ { $number }
21 changes: 21 additions & 0 deletions i18n/ca.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = Figura
table = Taula
proof = Demostració
tableofcontents-title = Índex
index = Índex alfabètic
listoffigures = Índex de figures
listoftables = Índex de taules
abstract = Resum
bibliography = Bibliografia
glossary = Glossari
preface = Pròleg
references = Referències
page = Pàgina
see = Vegeu
see-also = Vegeu també
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Apèndix { $number }
book-chapter-title = Capítol { $number }
part-template = Part { $number }
24 changes: 21 additions & 3 deletions i18n/cs.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
toc-title = Obsah

book-chapter-title-pre = Kapitola{" "}
figure = Obrázek
table = Tabulka
proof = Důkaz
tableofcontents-title = Obsah
index = Rejstřík
listoffigures = Seznam obrázků
listoftables = Seznam tabulek
abstract = Abstrakt
bibliography = Literatura
glossary = Slovník
preface = Předmluva
references = Reference
page = Strana
see = viz
see-also = viz také
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Příloha { $number }
book-chapter-title = Kapitola { $number }
part-template = Část { $number }
18 changes: 18 additions & 0 deletions i18n/cy.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
figure = Darlun
table = Taflen
proof = Prawf
tableofcontents-title = Cynnwys
index = Mynegai
listoffigures = Rhestr Ddarluniau
listoftables = Rhestr Dablau
abstract = Crynodeb
bibliography = Llyfryddiaeth
glossary = Rhestr termau
preface = Rhagair
references = Cyfeiriadau
page = tudalen
see = gweler
see-also = gweler hefyd
appendix-template = Atodiad { $number }
book-chapter-title = Pennod { $number }
part-template = Rhan { $number }
21 changes: 21 additions & 0 deletions i18n/da.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = Figur
table = Tabel
proof = Bevis
tableofcontents-title = Indhold
index = Indeks
listoffigures = Figurer
listoftables = Tabeller
abstract = Resumé
bibliography = Litteratur
glossary = Gloseliste
preface = Forord
references = Litteratur
page = Side
see = Se
see-also = Se også
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Bilag { $number }
book-chapter-title = Kapitel { $number }
part-template = Del { $number }
21 changes: 21 additions & 0 deletions i18n/de.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = Abbildung
table = Tabelle
proof = Beweis
tableofcontents-title = Inhaltsverzeichnis
index = Index
listoffigures = Abbildungsverzeichnis
listoftables = Tabellenverzeichnis
abstract = Zusammenfassung
bibliography = Literaturverzeichnis
glossary = Glossar
preface = Vorwort
references = Literatur
page = Seite
see = siehe
see-also = siehe auch
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Anhang { $number }
book-chapter-title = Kapitel { $number }
part-template = Teil { $number }
21 changes: 21 additions & 0 deletions i18n/el-monoton.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = Σχήμα
table = Πίνακας
proof = Απόδειξη
tableofcontents-title = Περιεχόμενα
index = Ευρετήριο
listoffigures = Κατάλογος Σχημάτων
listoftables = Κατάλογος Πινάκων
abstract = Περίληψη
bibliography = Βιβλιογραφία
glossary = Γλωσσάρι
preface = Πρόλογος
references = Αναφορές
page = Σελίδα
see = βλέπε
see-also = βλέπε επίσης
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Παράρτημα { $number }
book-chapter-title = Κεφάλαιο { $number }
part-template = Μέρος { $number }
21 changes: 21 additions & 0 deletions i18n/el-polyton.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = Σχῆμα
table = Πίνακας
proof = Ἀπόδειξη
tableofcontents-title = Περιεχόμενα
index = Εὑρετήριο
listoffigures = Κατάλογος Σχημάτων
listoftables = Κατάλογος Πινάκων
abstract = Περίληψη
bibliography = Βιβλιογραφία
glossary = Γλωσσάρι
preface = Πρόλογος
references = Ἀναφορές
page = Σελίδα
see = βλέπε
see-also = βλέπε ἐπίσης
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Παράρτημα { $number }
book-chapter-title = Κεφάλαιο { $number }
part-template = Μέρος { $number }
21 changes: 21 additions & 0 deletions i18n/el.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
figure = Σχήμα
table = Πίνακας
proof = Απόδειξη
tableofcontents-title = Περιεχόμενα
index = Ευρετήριο
listoffigures = Κατάλογος Σχημάτων
listoftables = Κατάλογος Πινάκων
abstract = Περίληψη
bibliography = Βιβλιογραφία
glossary = Γλωσσάρι
preface = Πρόλογος
references = Αναφορές
page = Σελίδα
see = βλέπε
see-also = βλέπε επίσης
bibliography-edited-by = { $name }
bibliography-et-al = et al.
bibliography-translated-by = { $name }
appendix-template = Παράρτημα { $number }
book-chapter-title = Κεφάλαιο { $number }
part-template = Μέρος { $number }
Loading