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

[Various languages] Fix AM/PM for times with hour of 12 #2798

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion responses/ar/HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ responses:
default: >
{% set minute_str = '{0:02d}'.format(slots.time.minute) %}

{% if slots.time.hour <= 12: %}
{% if slots.time.hour == 0: %}
12:{{ minute_str }} صباحا
{% elif slots.time.hour < 12: %}
{{ slots.time.hour }}:{{ minute_str }} صباحا
{% elif slots.time.hour == 12: %}
12:{{ minute_str }} مساءا
{% else: %}
{{ slots.time.hour - 12 }}:{{ minute_str }} مساءا
{% endif %}
6 changes: 5 additions & 1 deletion responses/en/HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ responses:
default: >
{% set minute_str = '{0:02d}'.format(slots.time.minute) %}

{% if slots.time.hour <= 12: %}
{% if slots.time.hour == 0: %}
12:{{ minute_str }} AM
{% elif slots.time.hour < 12: %}
{{ slots.time.hour }}:{{ minute_str }} AM
{% elif slots.time.hour == 12: %}
12:{{ minute_str }} PM
{% else: %}
{{ slots.time.hour - 12 }}:{{ minute_str }} PM
{% endif %}
6 changes: 5 additions & 1 deletion responses/he/HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ responses:
default: >
{% set minute_str = '{0:02d}'.format(slots.time.minute) %}

{% if slots.time.hour <= 12: %}
{% if slots.time.hour == 0: %}
12:{{ minute_str }} לפנות בוקר
{% elif slots.time.hour < 12: %}
{{ slots.time.hour }}:{{ minute_str }} לפנות בוקר
{% elif slots.time.hour == 12: %}
12:{{ minute_str }} אחרי הצהריים
{% else: %}
{{ slots.time.hour - 12 }}:{{ minute_str }} אחרי הצהריים
{% endif %}
11 changes: 9 additions & 2 deletions responses/th/HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ responses:
HassGetCurrentTime:
default: "TODO: {% set minute_str = '{0:02d}'.format(slots.time.minute) %}

{% if slots.time.hour <= 12: %} {{ slots.time.hour }}:{{ minute_str }} AM
{% else: %} {{ slots.time.hour - 12 }}:{{ minute_str }} PM {% endif %}
{% if slots.time.hour == 0: %}
12:{{ minute_str }} AM
{% elif slots.time.hour < 12: %}
{{ slots.time.hour }}:{{ minute_str }} AM
{% elif slots.time.hour == 12: %}
12:{{ minute_str }} PM
{% else: %}
{{ slots.time.hour - 12 }}:{{ minute_str }} PM
{% endif %}

"
8 changes: 6 additions & 2 deletions responses/zh-cn/HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ responses:
default: >
{% set minute_str = '{0:02d}'.format(slots.time.minute) %}

{% if slots.time.hour <= 12: %}
{% if slots.time.hour == 0: %}
上午12点{{ minute_str }}分
{% elif slots.time.hour < 12: %}
上午{{ slots.time.hour }}点{{ minute_str }}分
{% elif slots.time.hour == 12: %}
下午12点{{ minute_str }}分
{% else: %}
下午{{ slots.time.hour - 12 }}点{ minute_str }}分
下午{{ slots.time.hour - 12 }}点{{ minute_str }}分
{% endif %}
6 changes: 5 additions & 1 deletion responses/zh-hk/HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ responses:
default: >
{% set minute_str = '{0:02d}'.format(slots.time.minute) %}

{% if slots.time.hour <= 12: %}
{% if slots.time.hour == 0: %}
上晝 12點{{ minute_str }}分
{% elif slots.time.hour < 12: %}
上晝 {{ slots.time.hour }}點{{ minute_str }}分
{% elif slots.time.hour == 12: %}
下晝 12點{{ minute_str }}分
{% else: %}
下晝 {{ slots.time.hour - 12 }}點{{ minute_str }}分
{% endif %}
Loading