- Revise lang files: use `string.format()`, clean up template and message placeholders, include comments for translated lines (thanks to lucidiot for FR translation and suggestions) - Clarify dependencies in build instructionsmain 0.3
parent
9450de7fc3
commit
4e1afaa621
@ -1,145 +0,0 @@
|
||||
local en = {}
|
||||
|
||||
-- Templates
|
||||
en.tpl_vars = {
|
||||
post = {
|
||||
author = "{{ post_author }}",
|
||||
content = "{{ post_content }}",
|
||||
date = "{{ post_date }}",
|
||||
summary = "{{ post_summary }}",
|
||||
tags = "{{ post_tags }}",
|
||||
title = "{{ post_title }}",
|
||||
url = "{{ post_url }}",
|
||||
},
|
||||
feed = {
|
||||
date = "{{ feed_date }}",
|
||||
url = "{{ feed_url }}",
|
||||
},
|
||||
index = {
|
||||
posts = "{{ posts }}",
|
||||
},
|
||||
log = {
|
||||
author = "{{ log_author }}",
|
||||
subtitle = "{{ log_subtitle }}",
|
||||
title = "{{ log_title }}",
|
||||
log_url = "{{ log_url }}",
|
||||
},
|
||||
}
|
||||
|
||||
en.atom_header = [[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{{ log_title }}</title>
|
||||
<subtitle>{{ log_subtitle }}</subtitle>
|
||||
<updated>{{ feed_date }}</updated>
|
||||
<author>
|
||||
<name>{{ log_author }}</name>
|
||||
</author>
|
||||
<id>{{ feed_url }}</id>
|
||||
<link href="{{ log_url }}" rel="alternate"/>
|
||||
<link href="{{ feed_url }}" rel="self" type="application/atom+xml"/>
|
||||
]]
|
||||
|
||||
en.atom_entry = [[
|
||||
<entry>
|
||||
<id>{{ post_url }}</id>
|
||||
<title>
|
||||
<![CDATA[{{ post_title }}]] .. "]]>" .. [[
|
||||
|
||||
</title>
|
||||
<updated>{{ post_date }}</updated>
|
||||
<author>
|
||||
<name>{{ post_author }}</name>
|
||||
</author>
|
||||
<link href="{{ post_url }}" rel="alternate"/>
|
||||
<summary>
|
||||
<![CDATA[{{ post_summary }}]] .. "]]>" .. [[
|
||||
|
||||
</summary>
|
||||
<content>
|
||||
<![CDATA[{{ post_content }}]] .. "]]>" .. [[
|
||||
|
||||
</content>
|
||||
</entry>
|
||||
]]
|
||||
|
||||
en.atom_footer = [[</feed>]]
|
||||
|
||||
en.post = [[---
|
||||
date: {{ post_date }}
|
||||
---
|
||||
|
||||
# {{ post_title }}
|
||||
|
||||
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
=> gemini:// link
|
||||
=> gemini:// link (img)
|
||||
=> https:// link (https)]]
|
||||
|
||||
en.index = [[
|
||||
# {{ log_title }}
|
||||
{{ posts }}
|
||||
]]
|
||||
|
||||
en.page = [[
|
||||
# {{ post_title }}
|
||||
|
||||
## Heading 2
|
||||
### Heading 3
|
||||
|
||||
List:
|
||||
|
||||
*
|
||||
*
|
||||
*
|
||||
|
||||
```
|
||||
Preformatted text
|
||||
```
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
=> gemini:// link
|
||||
=> gemini:// link (img)
|
||||
=> https:// link (https)]]
|
||||
|
||||
-- App command options and messages output
|
||||
en.opts = {
|
||||
config = "config",
|
||||
page = "page",
|
||||
post = "post",
|
||||
index = "index",
|
||||
publish = "publish",
|
||||
help = "help",
|
||||
version = "version",
|
||||
}
|
||||
|
||||
en.msgs = {
|
||||
add_gemtext = "Created ",
|
||||
help = [[ [options] [capsule] [title]
|
||||
|
||||
Options:
|
||||
|
||||
config Generate a config directory
|
||||
page [capsule] [title] Add a new page with the given title
|
||||
post [capsule] [title] Add a new gemlog post with the given title
|
||||
index Generate an index page and feed of posts
|
||||
publish Index and copy posts remotely using scp
|
||||
help Show this help message
|
||||
version Print version info]],
|
||||
index = "Created index page and feed.",
|
||||
load_config = [[Created config files. Please edit them with the correct
|
||||
details before proceeding. The config files can be found at:
|
||||
]],
|
||||
publish = "Published capsule.",
|
||||
}
|
||||
|
||||
en.errs = {
|
||||
invalid_cap_id = "Error: unknown capsule id.",
|
||||
}
|
||||
|
||||
return en
|
@ -0,0 +1,157 @@
|
||||
local en = {}
|
||||
|
||||
-- Templates
|
||||
en.tpl_vars = {
|
||||
post = {
|
||||
author = "{{ author }}",
|
||||
content = "{{ content }}",
|
||||
date = "{{ date }}",
|
||||
summary = "{{ summary }}",
|
||||
-- This is not used in the templates yet.
|
||||
tags = "{{ tags }}",
|
||||
title = "{{ title }}",
|
||||
url = "{{ url }}",
|
||||
},
|
||||
feed = {
|
||||
date = "{{ date }}",
|
||||
url = "{{ feed_url }}",
|
||||
},
|
||||
index = {
|
||||
posts = "{{ posts }}",
|
||||
},
|
||||
log = {
|
||||
author = "{{ author }}",
|
||||
subtitle = "{{ subtitle }}",
|
||||
title = "{{ title }}",
|
||||
url = "{{ log_url }}",
|
||||
},
|
||||
}
|
||||
|
||||
en.atom_header = [[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{{ title }}</title>
|
||||
<subtitle>{{ subtitle }}</subtitle>
|
||||
<updated>{{ date }}</updated>
|
||||
<author>
|
||||
<name>{{ author }}</name>
|
||||
</author>
|
||||
<id>{{ feed_url }}</id>
|
||||
<link href="{{ log_url }}" rel="alternate"/>
|
||||
<link href="{{ feed_url }}" rel="self" type="application/atom+xml"/>
|
||||
]]
|
||||
|
||||
en.atom_entry = [[
|
||||
<entry>
|
||||
<id>{{ url }}</id>
|
||||
<title>
|
||||
<![CDATA[{{ title }}]] .. "]]>" .. [[
|
||||
|
||||
</title>
|
||||
<updated>{{ date }}</updated>
|
||||
<author>
|
||||
<name>{{ author }}</name>
|
||||
</author>
|
||||
<link href="{{ url }}" rel="alternate"/>
|
||||
<summary>
|
||||
<![CDATA[{{ summary }}]] .. "]]>" .. [[
|
||||
|
||||
</summary>
|
||||
<content>
|
||||
<![CDATA[{{ content }}]] .. "]]>" .. [[
|
||||
|
||||
</content>
|
||||
</entry>
|
||||
]]
|
||||
|
||||
en.atom_footer = [[</feed>]]
|
||||
|
||||
en.post = [[---
|
||||
date: {{ date }}
|
||||
---
|
||||
|
||||
# {{ title }}
|
||||
|
||||
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
=> gemini:// link
|
||||
=> gemini:// link (img)
|
||||
=> https:// link (https)]]
|
||||
|
||||
en.index = [[
|
||||
# {{ title }}
|
||||
{{ posts }}
|
||||
]]
|
||||
|
||||
en.page = [[
|
||||
# {{ title }}
|
||||
|
||||
## Heading 2
|
||||
### Heading 3
|
||||
|
||||
List:
|
||||
|
||||
*
|
||||
*
|
||||
*
|
||||
|
||||
```
|
||||
Preformatted text
|
||||
```
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
=> gemini:// link
|
||||
=> gemini:// link (img)
|
||||
=> https:// link (https)]]
|
||||
|
||||
|
||||
en.msgs = {}
|
||||
|
||||
-- %s: gemtext filename
|
||||
en.msgs.add_gemtext = "Created %s."
|
||||
|
||||
-- %s: app executable name
|
||||
en.msgs.help_usage = [[%s [options] [capsule] [title]
|
||||
|
||||
]]
|
||||
|
||||
-- %s: command-line options
|
||||
-- (see env.lua env.cli_opts for the full list)
|
||||
en.msgs.help_opts = [[
|
||||
Options:
|
||||
|
||||
%s [lang] Generate a config directory
|
||||
%s [capsule] [title] Add a new page with the given title
|
||||
%s [capsule] [title] Add a new gemlog post with the given title
|
||||
%s Generate an index page and feed of posts
|
||||
%s Index and copy posts remotely using scp
|
||||
%s Show this help message
|
||||
%s Print version info
|
||||
]]
|
||||
|
||||
-- %s: list of language codes
|
||||
en.msgs.help_lang_opts = [[
|
||||
|
||||
Config language options:
|
||||
|
||||
%s]]
|
||||
|
||||
en.msgs.index = "Created index page and feed."
|
||||
|
||||
-- %s: config directory path
|
||||
en.msgs.load_config = [[Created config files. Please edit them with the correct
|
||||
details before proceeding. The config files can be found at:
|
||||
%s]]
|
||||
|
||||
en.msgs.publish = "Published capsule."
|
||||
|
||||
|
||||
en.errs = {
|
||||
invalid_cap_id = "Error: unknown capsule id.",
|
||||
}
|
||||
|
||||
return en
|
@ -1,157 +0,0 @@
|
||||
local fr = {}
|
||||
|
||||
-- Templates
|
||||
fr.tpl_vars = {
|
||||
post = {
|
||||
-- It might not be really necessary to mention post/feed/log each time
|
||||
-- since those occur in different templates?
|
||||
-- This would make the french translated tags much cleaner, because the
|
||||
-- proper way to do this translation would be "auteur_de_l'article"
|
||||
-- (author_of_the_post).
|
||||
author = "{{ auteur_article }}",
|
||||
content = "{{ contenu_article }}",
|
||||
date = "{{ date_article }}",
|
||||
summary = "{{ résumé_article }}",
|
||||
-- This is not used in the templates.
|
||||
tags = "{{ tags_article }}",
|
||||
title = "{{ titre_article }}",
|
||||
url = "{{ url_article }}",
|
||||
},
|
||||
feed = {
|
||||
date = "{{ date_flux }}",
|
||||
url = "{{ url_flux }}",
|
||||
},
|
||||
index = {
|
||||
posts = "{{ articles }}",
|
||||
},
|
||||
log = {
|
||||
-- The concept of a "gemlog" does not have a French translation
|
||||
-- as far as I know, so I used 'capsule' instead of 'log'.
|
||||
author = "{{ auteur_capsule }}",
|
||||
subtitle = "{{ sous_titre_capsule }}",
|
||||
title = "{{ titre_capsule }}",
|
||||
log_url = "{{ url_capsule }}",
|
||||
},
|
||||
}
|
||||
|
||||
fr.atom_header = [[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{{ titre_capsule }}</title>
|
||||
<subtitle>{{ sous_titre_capsule }}</subtitle>
|
||||
<updated>{{ date_flux }}</updated>
|
||||
<author>
|
||||
<name>{{ auteur_capsule }}</name>
|
||||
</author>
|
||||
<id>{{ url_flux }}</id>
|
||||
<link href="{{ url_capsule }}" rel="alternate"/>
|
||||
<link href="{{ url_flux }}" rel="self" type="application/atom+xml"/>
|
||||
]]
|
||||
|
||||
fr.atom_entry = [[
|
||||
<entry>
|
||||
<id>{{ url_article }}</id>
|
||||
<title>
|
||||
<![CDATA[{{ titre_article }}]] .. "]]>" .. [[
|
||||
|
||||
</title>
|
||||
<updated>{{ date_article }}</updated>
|
||||
<author>
|
||||
<name>{{ auteur_article }}</name>
|
||||
</author>
|
||||
<link href="{{ url_article }}" rel="alternate"/>
|
||||
<summary>
|
||||
<![CDATA[{{ résumé_article }}]] .. "]]>" .. [[
|
||||
|
||||
</summary>
|
||||
<content>
|
||||
<![CDATA[{{ contenu_article }}]] .. "]]>" .. [[
|
||||
|
||||
</content>
|
||||
</entry>
|
||||
]]
|
||||
|
||||
fr.atom_footer = [[</feed>]]
|
||||
|
||||
fr.post = [[---
|
||||
date: {{ date_article }}
|
||||
---
|
||||
|
||||
# {{ titre_article }}
|
||||
|
||||
|
||||
|
||||
|
||||
## Liens
|
||||
|
||||
=> gemini:// lien
|
||||
=> gemini:// lien (image)
|
||||
=> https:// lien (https)]]
|
||||
|
||||
fr.index = [[
|
||||
# {{ titre_capsule }}
|
||||
{{ articles }}
|
||||
]]
|
||||
|
||||
fr.page = [[
|
||||
# {{ titre_article }}
|
||||
|
||||
## Titre de niveau 2
|
||||
### Titre de niveau 3
|
||||
|
||||
Liste :
|
||||
|
||||
*
|
||||
*
|
||||
*
|
||||
|
||||
```
|
||||
Texte préformaté
|
||||
```
|
||||
|
||||
|
||||
## Liens
|
||||
|
||||
=> gemini:// lien
|
||||
=> gemini:// lien (image)
|
||||
=> https:// lien (https)]]
|
||||
|
||||
-- App command options and messages output
|
||||
-- These probably should always stay untranslated, because having a CLI's
|
||||
-- entire command line change depending on the language would be a mess.
|
||||
-- Imagine writing bash in french…
|
||||
fr.opts = {
|
||||
config = "config",
|
||||
page = "page",
|
||||
post = "post",
|
||||
index = "index",
|
||||
publish = "publish",
|
||||
help = "help",
|
||||
version = "version",
|
||||
}
|
||||
|
||||
fr.msgs = {
|
||||
add_gemtext = "Créé ",
|
||||
help = [[ [options] [capsule] [titre]
|
||||
|
||||
Options :
|
||||
|
||||
config Générer un dossier de configuration
|
||||
page [capsule] [titre] Ajouter une nouvelle page avec le titre fourni
|
||||
post [capsule] [titre] Ajouter un nouvel article avec le titre fourni
|
||||
index Générer une page d'accueil et un flux d'articles
|
||||
publish Générer les pages puis les publier via scp
|
||||
help Afficher ce message d'aide
|
||||
version Afficher les informations de version]],
|
||||
index = "Flux et page d'accueil créés.",
|
||||
load_config = [[Les fichiers de configuration ont été créés. Veuillez y
|
||||
inscrire les valeurs correctes avant de continuer.
|
||||
Les fichiers peuvent être trouvés dans :
|
||||
]],
|
||||
publish = "Capsule publiée.",
|
||||
}
|
||||
|
||||
fr.errs = {
|
||||
invalid_cap_id = "Erreur: Identifiant de capsule inconnu.",
|
||||
}
|
||||
|
||||
return fr
|
@ -0,0 +1,160 @@
|
||||
local fr = {}
|
||||
|
||||
-- Templates
|
||||
fr.tpl_vars = {
|
||||
post = {
|
||||
author = "{{ auteur }}",
|
||||
content = "{{ contenu }}",
|
||||
date = "{{ date }}",
|
||||
summary = "{{ résumé }}",
|
||||
-- This is not used in the templates yet.
|
||||
tags = "{{ tags }}",
|
||||
title = "{{ titre }}",
|
||||
url = "{{ url }}",
|
||||
},
|
||||
feed = {
|
||||
date = "{{ date }}",
|
||||
url = "{{ url_flux }}",
|
||||
},
|
||||
index = {
|
||||
posts = "{{ articles }}",
|
||||
},
|
||||
log = {
|
||||
-- The concept of a "gemlog" does not have a French translation,
|
||||
-- the closest term after some discussion might be "journal".
|
||||
author = "{{ auteur }}",
|
||||
subtitle = "{{ sous_titre }}",
|
||||
title = "{{ titre }}",
|
||||
log_url = "{{ url_journal }}",
|
||||
},
|
||||
}
|
||||
|
||||
fr.atom_header = [[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{{ titre }}</title>
|
||||
<subtitle>{{ sous_titre }}</subtitle>
|
||||
<updated>{{ date }}</updated>
|
||||
<author>
|
||||
<name>{{ auteur }}</name>
|
||||
</author>
|
||||
<id>{{ url_flux }}</id>
|
||||
<link href="{{ url_journal }}" rel="alternate"/>
|
||||
<link href="{{ url_flux }}" rel="self" type="application/atom+xml"/>
|
||||
]]
|
||||
|
||||
fr.atom_entry = [[
|
||||
<entry>
|
||||
<id>{{ url }}</id>
|
||||
<title>
|
||||
<![CDATA[{{ titre }}]] .. "]]>" .. [[
|
||||
|
||||
</title>
|
||||
<updated>{{ date }}</updated>
|
||||
<author>
|
||||
<name>{{ auteur }}</name>
|
||||
</author>
|
||||
<link href="{{ url }}" rel="alternate"/>
|
||||
<summary>
|
||||
<![CDATA[{{ résumé }}]] .. "]]>" .. [[
|
||||
|
||||
</summary>
|
||||
<content>
|
||||
<![CDATA[{{ contenu }}]] .. "]]>" .. [[
|
||||
|
||||
</content>
|
||||
</entry>
|
||||
]]
|
||||
|
||||
fr.atom_footer = [[</feed>]]
|
||||
|
||||
fr.post = [[---
|
||||
date: {{ date }}
|
||||
---
|
||||
|
||||
# {{ titre }}
|
||||
|
||||
|
||||
|
||||
|
||||
## Liens
|
||||
|
||||
=> gemini:// lien
|
||||
=> gemini:// lien (image)
|
||||
=> https:// lien (https)]]
|
||||
|
||||
fr.index = [[
|
||||
# {{ titre }}
|
||||
{{ articles }}
|
||||
]]
|
||||
|
||||
fr.page = [[
|
||||
# {{ titre }}
|
||||
|
||||
## Titre de niveau 2
|
||||
### Titre de niveau 3
|
||||
|
||||
Liste :
|
||||
|
||||
*
|
||||
*
|
||||
*
|
||||
|
||||
```
|
||||
Texte préformaté
|
||||
```
|
||||
|
||||
|
||||
## Liens
|
||||
|
||||
=> gemini:// lien
|
||||
=> gemini:// lien (image)
|
||||
=> https:// lien (https)]]
|
||||
|
||||
|
||||
fr.msgs = {}
|
||||
|
||||
-- %s: gemtext filename
|
||||
fr.msgs.add_gemtext = "%s créé."
|
||||
|
||||
-- %s: app executable name
|
||||
fr.msgs.help_usage = [[%s [options] [capsule] [titre]
|
||||
|
||||
]]
|
||||
|
||||
-- %s: command-line options
|
||||
-- (see env.lua env.cli_opts for the full list)
|
||||
fr.msgs.help_opts = [[
|
||||
Options :
|
||||
|
||||
%s [lang] Générer un dossier de configuration
|
||||
%s [capsule] [titre] Ajouter une nouvelle page avec le titre fourni
|
||||
%s [capsule] [titre] Ajouter un nouvel article avec le titre fourni
|
||||
%s Générer une page d'accueil et un flux d'articles
|
||||
%s Générer les pages puis les publier via scp
|
||||
%s Afficher ce message d'aide
|
||||
%s Afficher les informations de version
|
||||
]]
|
||||
|
||||
-- %s: list of language codes
|
||||
fr.msgs.help_lang_opts = [[
|
||||
|
||||
Langues disponibles :
|
||||
|
||||
%s]]
|
||||
|
||||
fr.msgs.index = "Flux et page d'accueil créés."
|
||||
|
||||
-- %s: config directory path
|
||||
fr.msgs.load_config = [[Les fichiers de configuration ont été créés. Veuillez y
|
||||
inscrire les valeurs correctes avant de continuer.
|
||||
Les fichiers peuvent être trouvés dans :
|
||||
%s]]
|
||||
|
||||
fr.msgs.publish = "Capsule publiée."
|
||||
|
||||
|
||||
fr.errs = {
|
||||
invalid_cap_id = "Erreur: Identifiant de capsule inconnu.",
|
||||
}
|
||||
|
||||
return fr
|
Loading…
Reference in new issue