Skip to content

Commit

Permalink
Internationalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
tunetheweb committed Nov 10, 2024
1 parent 2571cd6 commit dfedf4a
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/templates/base/base_chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,22 +338,24 @@ <h2 id="authors">

{% macro render_bibtex() %}
<h2 id="cite">
<a href="#cite" class="anchor-link">BibTeX</a>
<a href="#cite" class="anchor-link">{{ self.citation() }}</a>
</h2>
<pre id="bibtex-citation">
<details>
<summary>BibTeX</summary>
<pre id="bibtex-citation">
@inbook{WebAlmanac.{{ year }}.{{ metadata.get('title').replace(' ', '') }},
author = "{% for author in metadata.get('authors') -%}
{%- set authordata = config.contributors.get(author, None) -%}
{%- if authordata %}
{%- set full_name = authordata.name.split(' ') -%}
{{ full_name[-1] }}, {{ full_name[0] }}{% if full_name|length > 2 %} {{ full_name[1:-1]|join(' ') }}{% endif %}{% if not loop.last %} and {% endif %}
{{ full_name[-1] }}{{ self.comma() }}{{ full_name[0] }}{% if full_name|length > 2 %} {{ full_name[1:-1]|join(' ') }}{% endif %}{% if not loop.last %}{{ self.and() }}{% endif %}
{%- else %}
{%- set full_name = author.split(' ') -%}
{{ full_name[-1] }}, {{ full_name[0] }}{% if full_name|length > 2 %} {{ full_name[1:-1]|join(' ') }}{% endif %}{% if not loop.last %} and {% endif %}
{{ full_name[-1] }}{{ self.comma() }}{{ full_name[0] }}{% if full_name|length > 2 %} {{ full_name[1:-1]|join(' ') }}{% endif %}{% if not loop.last %}{{ self.and() }}{% endif %}
{%- endif %}
{%- endfor %}",
title = "{{ metadata.get('title') }}",
booktitle = "The {{ year }} Web Almanac",
booktitle = "{{ self.citation_journal_title() }}",
chapter = {{ chapter_config.chapter_number }},
publisher = "HTTP Archive",
year = "{{ year }}",
Expand All @@ -362,6 +364,7 @@ <h2 id="cite">
doi = "{{ metadata.get('doi')}}",{%- endif %}
url = "https://almanac.httparchive.org/en/{{ year }}/{{ metadata.get('chapter') }}"
}</pre>
</details>
{% endmacro %}

{% macro render_prevnext() %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/en/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} on LinkedIn{% endmacro %}
{% macro website(authorName) %}{{authorName}} website{% endmacro %}

{% block citation %}Citation{% endblock %}

{% macro edition(year) %}{{ year }} Edition{% endmacro %}

{% block footer_title %}Footer navigation{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/es/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} en LinkedIn{% endmacro %}
{% macro website(authorName) %}{{authorName}} sitio web{% endmacro %}

{% block citation %}Citación{% endblock %}

{% macro edition(year) %}Edición {{ year }}{% endmacro %}

{% block footer_title %}Navegación de pie de página{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/fr/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} sur LinkedIn{% endmacro %}
{% macro website(authorName) %}site web de {{authorName}}{% endmacro %}

{% block citation %}Citation{% endblock %}

{% macro edition(year) %}Édition {{ year }}{% endmacro %}

{% block footer_title %}Navigation dans le pied de page{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/hi/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} LinkedIn पर{% endmacro %}
{% macro website(authorName) %}{{authorName}} वेबसाइट{% endmacro %}

{% block citation %}उद्धरण{% endblock %}

{% macro edition(year) %}{{ year }} संस्करण{% endmacro %}

{% block footer_title %}फुटर नेविगेशन{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/it/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} su LinkedIn{% endmacro %}
{% macro website(authorName) %}{{authorName}} sito web{% endmacro %}

{% block citation %}Citazione{% endblock %}

{% macro edition(year) %}Edizione {{ year }}{% endmacro %}

{% block footer_title %}Navigazione nel footer di pagina{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/ja/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}LinkedInの{{authorName}}{% endmacro %}
{% macro website(authorName) %}{{authorName}} ウェブサイト{% endmacro %}

{% block citation %}引用{% endblock %}

{% macro edition(year) %}{{ year }} 版{% endmacro %}

{% block footer_title %}フッターナビゲーション{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/nl/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} op LinkedIn{% endmacro %}
{% macro website(authorName) %}website van {{authorName}} {% endmacro %}

{% block citation %}Citaat{% endblock %}

{% macro edition(year) %}{{ year }} Editie{% endmacro %}

{% block footer_title %}Voettekst navigatie{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/pt/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} no LinkedIn{% endmacro %}
{% macro website(authorName) %}{{authorName}} website{% endmacro %}

{% block citation %}Citaat{% endblock %}

{% macro edition(year) %}{{ year }} Edição{% endmacro %}

{% block footer_title %}Navegação no rodapé{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/ru/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} на LinkedIn{% endmacro %}
{% macro website(authorName) %}Сайт {{authorName}}{% endmacro %}

{% block citation %}Цитата{% endblock %}

{% macro edition(year) %}Издание от {{ year }} года{% endmacro %}

{% block footer_title %}Навигация по футеру{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/tr/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} LinkedIn üzerinde {% endmacro %}
{% macro website(authorName) %}{{authorName}} website{% endmacro %}

{% block citation %}Alıntı{% endblock %}

{% macro edition(year) %}{{ year }} Baskısı{% endmacro %}

{% block footer_title %}Footer navigasyon{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/uk/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} у LinkedIn{% endmacro %}
{% macro website(authorName) %}вебсайт {{authorName}}{% endmacro %}

{% block citation %}Цитування{% endblock %}

{% macro edition(year) %}Видання {{ year }} року{% endmacro %}

{% block footer_title %}Підвальна навігація{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/zh-CN/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} 在 LinkedIn{% endmacro %}
{% macro website(authorName) %}{{authorName}} 网站{% endmacro %}

{% block citation %}引用{% endblock %}

{% macro edition(year) %}{{ year }} 版{% endmacro %}

{% block footer_title %}页脚导航{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/zh-TW/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
{% macro onLinkedIn(authorName) %}{{authorName}} LinkedIn{% endmacro %}
{% macro website(authorName) %}{{authorName}} 網站{% endmacro %}

{% block citation %}引文{% endblock %}

{% macro edition(year) %}{{ year }} 版{% endmacro %}

{% block footer_title %}註腳導覽{% endblock %}
Expand Down

0 comments on commit dfedf4a

Please sign in to comment.