Skip to content
Open
22 changes: 18 additions & 4 deletions apps/web/core/components/home/user-greetings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,50 @@ export function UserGreetingsView(props: IUserGreetingsView) {
// store hooks
const { t } = useTranslation();

const userTimezone = (() => {
if (!user?.user_timezone) return undefined;
try {
Intl.DateTimeFormat(undefined, { timeZone: user.user_timezone });
return user.user_timezone;
} catch {
return undefined;
}
})();
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

const hour = new Intl.DateTimeFormat("en-US", {
timeZone: userTimezone,
hour12: false,
hour: "numeric",
}).format(currentTime);

const date = new Intl.DateTimeFormat("en-US", {
timeZone: userTimezone,
month: "short",
day: "numeric",
}).format(currentTime);

const weekDay = new Intl.DateTimeFormat("en-US", {
timeZone: userTimezone,
weekday: "long",
}).format(currentTime);

const timeString = new Intl.DateTimeFormat("en-US", {
timeZone: user?.user_timezone,
hour12: false, // Use 24-hour format
timeZone: userTimezone,
hour12: false,
hour: "2-digit",
minute: "2-digit",
}).format(currentTime);

const greeting = parseInt(hour, 10) < 12 ? "morning" : parseInt(hour, 10) < 18 ? "afternoon" : "evening";
const hourNum = parseInt(hour, 10);
const greeting = hourNum < 5 ? "night" : hourNum < 12 ? "morning" : hourNum < 18 ? "afternoon" : "evening";

return (
<div className="my-6 flex flex-col items-center">
<h2 className="text-center text-20 font-semibold">
{t("good")} {t(greeting)}, {user?.first_name} {user?.last_name}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
</h2>
<h5 className="flex items-center gap-2 font-medium text-placeholder">
<div>{greeting === "morning" ? "🌤️" : greeting === "afternoon" ? "🌥️" : "🌙"}</div>
<div>{greeting === "morning" ? "🌤️" : greeting === "afternoon" ? "🌥️" : "🌙"}</div>
<div>
{weekDay}, {date} {timeString}
</div>
Expand Down
22 changes: 18 additions & 4 deletions apps/web/core/components/user/user-greetings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,50 @@ export function UserGreetingsView(props: IUserGreetingsView) {
// store hooks
const { t } = useTranslation();

const userTimezone = (() => {
if (!user?.user_timezone) return undefined;
try {
Intl.DateTimeFormat(undefined, { timeZone: user.user_timezone });
return user.user_timezone;
} catch {
return undefined;
}
})();

const hour = new Intl.DateTimeFormat("en-US", {
timeZone: userTimezone,
hour12: false,
hour: "numeric",
}).format(currentTime);

const date = new Intl.DateTimeFormat("en-US", {
timeZone: userTimezone,
month: "short",
day: "numeric",
}).format(currentTime);

const weekDay = new Intl.DateTimeFormat("en-US", {
timeZone: userTimezone,
weekday: "long",
}).format(currentTime);

const timeString = new Intl.DateTimeFormat("en-US", {
timeZone: user?.user_timezone,
hour12: false, // Use 24-hour format
timeZone: userTimezone,
hour12: false,
hour: "2-digit",
minute: "2-digit",
}).format(currentTime);

const greeting = parseInt(hour, 10) < 12 ? "morning" : parseInt(hour, 10) < 18 ? "afternoon" : "evening";
const hourNum = parseInt(hour, 10);
const greeting = hourNum < 5 ? "night" : hourNum < 12 ? "morning" : hourNum < 18 ? "afternoon" : "evening";
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

return (
<div className="my-6 flex flex-col items-center">
<h2 className="text-center text-20 font-semibold">
{t("good")} {t(greeting)}, {user?.first_name} {user?.last_name}
</h2>
<h5 className="flex items-center gap-2 font-medium text-placeholder">
<div>{greeting === "morning" ? "🌤️" : greeting === "afternoon" ? "🌥️" : "🌙"}</div>
<div>{greeting === "morning" ? "🌤️" : greeting === "afternoon" ? "🌥️" : "🌙"}</div>
<div>
{weekDay}, {date} {timeString}
</div>
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/cs/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ export default {
morning: "ráno",
afternoon: "odpoledne",
evening: "večer",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "Zobrazit vše",
show_less: "Zobrazit méně",
no_data_yet: "Zatím žádná data",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/de/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ export default {
morning: "Morgen",
afternoon: "Nachmittag",
evening: "Abend",
night: "night",
show_all: "Alle anzeigen",
show_less: "Weniger anzeigen",
no_data_yet: "Noch keine Daten",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/en/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ export default {
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night",
show_all: "Show all",
show_less: "Show less",
no_data_yet: "No Data yet",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/es/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ export default {
morning: "días",
afternoon: "tardes",
evening: "noches",
night: "night",
show_all: "Mostrar todo",
show_less: "Mostrar menos",
no_data_yet: "Aún no hay datos",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/fr/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ export default {
morning: "matin",
afternoon: "après-midi",
evening: "soir",
night: "night",
show_all: "Tout afficher",
show_less: "Afficher moins",
no_data_yet: "Pas encore de données",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/id/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ export default {
morning: "pagi",
afternoon: "siang",
evening: "malam",
night: "night",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all locale translation files and show the `night` key value to spot any that still carry the English literal or are otherwise untranslated.
fd -e ts 'translations\.ts$' packages/i18n/src/locales --exec sh -c 'printf "%s: " "$1"; rg -N "^\s*night:\s*" "$1" || echo "(missing)"' _ {}

Repository: makeplane/plane

Length of output: 1289


Untranslated night value in Indonesian and all 18 other non-English locales.

All non-English locale files carry the English literal "night" instead of translations. This is a systematic i18n defect affecting 18 locale files (id, zh-CN, vi-VN, zh-TW, tr-TR, sk, ro, ua, pt-BR, it, ja, fr, es, ko, ru, de, cs, pl).

For Indonesian (id), since the evening bucket already maps to "malam" and hours 0–4 require translation, "dini hari" (early morning hours) is semantically appropriate:

Suggested fix for Indonesian
-  night: "night",
+  night: "dini hari",

All 18 non-English locales require equivalent translations for the night key corresponding to the 00:00–04:59 time range.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
night: "night",
night: "dini hari",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/i18n/src/locales/id/translations.ts` at line 497, The translations
file contains an untranslated "night" key (e.g., in
packages/i18n/src/locales/id/translations.ts the entry night: "night") — replace
the English literal with the appropriate Indonesian string ("dini hari") and
ensure the semantic bucket for 00:00–04:59 is correct (note evening already maps
to "malam"); repeat the same fix across the other non-English locale files
listed (zh-CN, vi-VN, zh-TW, tr-TR, sk, ro, ua, pt-BR, it, ja, fr, es, ko, ru,
de, cs, pl) by replacing their "night" values with the correct localized
translations for the 00:00–04:59 time range while keeping the key name night
unchanged.

show_all: "Tampilkan semua",
show_less: "Tampilkan lebih sedikit",
no_data_yet: "Belum ada data",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/it/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ export default {
morning: "Mattina",
afternoon: "Pomeriggio",
evening: "Sera",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "Mostra tutto",
show_less: "Mostra meno",
no_data_yet: "Nessun dato disponibile",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/ja/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ export default {
morning: "ございます",
afternoon: "こんにちは",
evening: "こんばんは",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "すべて表示",
show_less: "表示を減らす",
no_data_yet: "まだデータがありません",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/ko/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ export default {
morning: "아침",
afternoon: "오후",
evening: "저녁",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "모두 보기",
show_less: "간략히 보기",
no_data_yet: "아직 데이터 없음",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/pl/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ export default {
morning: "rano",
afternoon: "po południu",
evening: "wieczorem",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "Pokaż wszystko",
show_less: "Pokaż mniej",
no_data_yet: "Brak danych",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/pt-BR/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ export default {
morning: "manhã",
afternoon: "tarde",
evening: "noite",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "Mostrar tudo",
show_less: "Mostrar menos",
no_data_yet: "Nenhum dado ainda",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/ro/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ export default {
morning: "dimineața",
afternoon: "după-amiaza",
evening: "seara",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "Arată tot",
show_less: "Arată mai puțin",
no_data_yet: "Nicio dată încă",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/ru/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ export default {
morning: "утра",
afternoon: "дня",
evening: "вечера",
night: "night",
show_all: "Показать все",
show_less: "Свернуть",
no_data_yet: "Нет данных",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/sk/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ export default {
morning: "ráno",
afternoon: "popoludnie",
evening: "večer",
night: "night",
show_all: "Zobraziť všetko",
show_less: "Zobraziť menej",
no_data_yet: "Zatiaľ žiadne dáta",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/tr-TR/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ export default {
morning: "sabah",
afternoon: "öğleden sonra",
evening: "akşam",
night: "night",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Localize the new Turkish night greeting.

This leaves the Turkish locale with an English greeting fragment.

🌐 Proposed localization fix
-  night: "night",
+  night: "gece",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
night: "night",
night: "gece",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/i18n/src/locales/tr-TR/translations.ts` at line 493, The Turkish
translations object currently has the key 'night' set to the English string
"night"; update the 'night' entry in the translations object to the correct
Turkish greeting (e.g., "iyi geceler") and ensure the value follows the same
quoting/casing style as the surrounding entries so the locale no longer contains
an English fragment.

show_all: "Tümünü göster",
show_less: "Daha az göster",
no_data_yet: "Henüz veri yok",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/ua/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ export default {
morning: "ранку",
afternoon: "дня",
evening: "вечора",
night: "night",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
show_all: "Показати все",
show_less: "Показати менше",
no_data_yet: "Поки що немає даних",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/vi-VN/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ export default {
morning: "Buổi sáng",
afternoon: "Buổi chiều",
evening: "Buổi tối",
night: "night",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Localize the new night label.

The vi-VN locale should not fall back to the English word night for the new 00:00–04:59 greeting bucket. Please use the approved Vietnamese wording.

🌐 Example fix
-  night: "night",
+  night: "Buổi đêm",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
night: "night",
night: "Buổi đêm",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/i18n/src/locales/vi-VN/translations.ts` at line 498, Replace the
English fallback for the translations key "night" in the translations object
with the approved Vietnamese wording; update the entry night: "night" to night:
"đêm" so the vi-VN locale shows the proper Vietnamese label for the 00:00–04:59
greeting bucket.

show_all: "Hiển thị tất cả",
show_less: "Hiển thị ít hơn",
no_data_yet: "Chưa có dữ liệu",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/zh-CN/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ export default {
morning: "早上",
afternoon: "下午",
evening: "晚上",
night: "night",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find locale files where the new night greeting still uses the English placeholder.
# Expected: Only English locale files, if any, should contain night: "night".

rg -n --glob 'translations.ts' 'night:\s*"night"' packages/i18n/src/locales

Repository: makeplane/plane

Length of output: 1346


Localize the new night label and address this across all non-English locales.

The Chinese locale (and 17 other non-English locale files) still use the English placeholder "night" instead of localized text. For zh-CN, replace it with "晚安" (or another approved Chinese term). Verify that all non-English locale files have proper translations:

  • it, zh-TW, zh-CN, tr-TR, ua, vi-VN, sk, pt-BR, ru, pl, ko, ro, ja, id, es, fr, de, cs (all currently contain night: "night")
Example fix for zh-CN
-  night: "night",
+  night: "晚安",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
night: "night",
night: "晚安",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/i18n/src/locales/zh-CN/translations.ts` at line 480, Replace the
English placeholder value for the translations key "night" in the zh-CN locale
by changing night: "night" to night: "晚安" in
packages/i18n/src/locales/zh-CN/translations.ts; then audit the other
non-English locale files (it, zh-TW, tr-TR, ua, vi-VN, sk, pt-BR, ru, pl, ko,
ro, ja, id, es, fr, de, cs) and replace their night: "night" entries with
appropriate localized strings for each language so all non-English locales have
translated text for the "night" label.

show_all: "显示全部",
show_less: "显示更少",
no_data_yet: "暂无数据",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/zh-TW/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ export default {
morning: "早上",
afternoon: "下午",
evening: "晚上",
night: "night",
Comment thread
MinitJain marked this conversation as resolved.
Outdated
show_all: "顯示全部",
show_less: "顯示較少",
no_data_yet: "尚無資料",
Expand Down