Skip to content

Commit

Permalink
mvp-tema-i18n (#9): l10n-corpus.liquid
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed May 13, 2021
1 parent 830694d commit e7f3e27
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
## Markdown are documentation (this could be changed later)
*.md linguist-documentation

## These files are HTML liquid templates
_includes/fn/* linguist-language=Liquid

## Files on systema/, at the moment, will be marked as vendored
## We may change a bit this later
systema/* linguist-vendored
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ defaults:
values:
layout: "defallo"
linguam: "lat"
linguam_alternum: "lat"
- scope:
path: "api/*/*/*/html"
values:
Expand Down
2 changes: 1 addition & 1 deletion _data/l10n.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#vocab+code,#vocab+l10n+i_lat,#vocab+l10n+i_eng,#vocab+l10n+i_por
#item+code,#item+l10n+i_lat,#item+l10n+i_eng,#item+l10n+i_por
l10n_API,API,API,API
l10n_API_UN,API UN 🇺🇳,API UN 🇺🇳,API UN 🇺🇳
l10n_openapi_filum,OpenAPI Fīlum,OpenAPI file,Arquivo OpenAPI
Expand Down
1 change: 1 addition & 0 deletions _includes/fn/l10n
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% capture vocab_no_spaces %}{% include fn/l10n-corpus.liquid vocab="l10n_API" %}{% endcapture %}{{ vocab_no_spaces | strip }}
15 changes: 15 additions & 0 deletions _includes/fn/l10n-corpus.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% capture hxl_col %}{{ '#item+l10n+i_' | append: page.linguam }}{% endcapture %}
{% capture hxl_col_alt %}{{ '#item+l10n+i_' | append: page.linguam_alternum }}{% endcapture %}
{% capture vocab_errorem %}{{ include.vocab | append: '!!' | prepend: '!!' }}{% endcapture %}

{% for vocab in site.data.l10n %}
{% if vocab['#item+code'] == include.vocab %}
{{ vocab[hxl_col] | default: vocab[hxl_col_alt] | default: vocab[hxl_col_alt] | default: vocab_errorem }}
{% assign resultatum_ok = true %}
{% break %}
{% endif %}
{% endfor %}

{% if resultatum_ok != true %}
{{ vocab_errorem }}
{% endif %}
5 changes: 0 additions & 5 deletions _includes/l10n.html

This file was deleted.

1 change: 1 addition & 0 deletions documentum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ published: false
- https://github.com/GingerBear/vscode-liquid
- https://marketplace.visualstudio.com/items?itemName=neilding.language-liquid
- https://github.com/siteleaf/liquid-syntax-mode
- https://marketplace.visualstudio.com/items?itemName=neilding.language-liquid
-->
9 changes: 6 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ description: |
English: Augmented documentation for Humanitarian APIs;
Português: Documentação interativa para APIs humanitárias
locale: la
linguam: lat
# linguam: lat
# linguam_alternum: lat
permalink: /
---

Expand Down Expand Up @@ -35,7 +36,9 @@ permalink: /
</div>
</div>

<!--
Testing
<pre>
{% include l10n.html _="l10n_API" %}
</pre>
{% include fn/l10n vocab="l10n_API" %}
</pre>
-->

0 comments on commit e7f3e27

Please sign in to comment.