Skip to content

Commit

Permalink
Added Internationalisation of Name
Browse files Browse the repository at this point in the history
Signed-off-by: DavidKrassnig <[email protected]>
  • Loading branch information
DavidKrassnig committed Jul 18, 2023
1 parent 8f754f2 commit 892ad02
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions _i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ not_found:
message: You will be redirected to the main page within 3 seconds. If not redirected, please go back to the
main_page: home page
main:
first_name: You
middle_name: R.
last_name: Name
address: >
<p>555 your office number</p>
<p>123 your address street</p>
Expand Down
3 changes: 3 additions & 0 deletions _i18n/pt-br.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ not_found:
message: Você será redirecionado para a página principal em 3 segundos. Se não for redirecionado, por favor volte para a
main_page: página principal
main:
first_name: Se
middle_name: U.
last_name: Nome
address: >
<p>555 seu telefone do trabalho</p>
<p>123 seu endereço</p>
Expand Down
4 changes: 2 additions & 2 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if site.footer_fixed %}
<footer class="fixed-bottom">
<div class="container mt-0">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {% t main.footer_text %}
&copy; Copyright {{ site.time | date: '%Y' }} {% t main.first_name %} {% t main.middle_name %} {% t main.last_name %}. {% t main.footer_text %}
{%- if site.impressum_path -%}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{%- endif -%}
Expand All @@ -13,7 +13,7 @@
{%- else -%}
<footer class="sticky-bottom mt-5">
<div class="container">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {% t main.footer_text %}
&copy; Copyright {{ site.time | date: '%Y' }} {% t main.first_name %} {% t main.middle_name %} {% t main.last_name %}. {% t main.footer_text %}
{%- if site.impressum_path -%}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{%- endif -%}
Expand Down
6 changes: 3 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<a class="navbar-brand title font-weight-lighter" href="{{ site.baseurl }}/">
{%- if site.title == "blank" -%}
{%- if site.first_name -%}
<span class="font-weight-bold">{{- site.first_name -}}&nbsp;</span>
<span class="font-weight-bold">{% t main.first_name %}&nbsp;</span>
{%- endif -%}
{%- if site.middle_name -%}
{{- site.middle_name -}}&nbsp;
{% t main.middle_name %}&nbsp;
{%- endif -%}
{%- if site.last_name -%}
{{- site.last_name -}}
{% t main.last_name %}
{%- endif -%}
{%- else -%}
{{- site.title -}}
Expand Down
2 changes: 1 addition & 1 deletion _includes/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{{ title }}
{%- endif -%}
</title>
<meta name="author" content="{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}" />
<meta name="author" content="{% t main.first_name %} {% t main.middle_name %} {% t main.last_name %}" />
<meta name="description" content="{%- if page.description -%}{{ page.description }}{%- else -%}{{ site.description }}{%- endif -%}" />
{%- if page.keywords or site.keywords %}
<meta name="keywords" content="{%- if page.keywords -%}{{ page.keywords }}{%- else -%}{{ site.keywords }}{%- endif -%}" />
Expand Down
2 changes: 1 addition & 1 deletion _layouts/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="post">
<header class="post-header">
<h1 class="post-title">
{% if site.title == "blank" -%}<span class="font-weight-bold">{{ site.first_name }}</span> {{ site.middle_name }} {{ site.last_name }}{%- else -%}{{ site.title }}{%- endif %}
{% if site.title == "blank" -%}<span class="font-weight-bold">{% t main.first_name %}</span> {% t main.middle_name %} {% t main.last_name %}{%- else -%}{{ site.title }}{%- endif %}
</h1>
<p class="desc">{% t main.subtitle %}</p>
</header>
Expand Down

0 comments on commit 892ad02

Please sign in to comment.