Skip to content

Commit

Permalink
lang changed
Browse files Browse the repository at this point in the history
  • Loading branch information
anviaan committed Oct 6, 2024
1 parent 5e37cb7 commit 18ce05d
Show file tree
Hide file tree
Showing 16 changed files with 151 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public static void register(CommandDispatcher<ServerCommandSource> dispatcher) {
}

private static int reportDay(CommandContext<ServerCommandSource> context) {
context.getSource().sendMessage(Text.translatable("title_report"));
context.getSource().sendMessage(Text.translatable("title_report").append(": "));

int days = context.getSource().getPlayer().getComponent(ModComponents.DAY).getDays();
int recordDay = context.getSource().getPlayer().getComponent(ModComponents.RECORD_DAY).getRecordDay();

context.getSource().sendFeedback(() -> Text.translatable("report_day", days), false);
context.getSource().sendFeedback(() -> Text.translatable("report_record_day", recordDay), false);
context.getSource().sendFeedback(() -> Text.translatable("report_day").append(": ").append(String.valueOf(days)), false);
context.getSource().sendFeedback(() -> Text.translatable("report_record_day").append(": ").append(String.valueOf(recordDay)), false);

return 1;
}
Expand All @@ -41,7 +41,7 @@ var record = context.getSource().getPlayer().getComponent(ModComponents.RECORD_D
record.setRecordDay(days);
}

context.getSource().sendFeedback(() -> Text.translatable("set_day", value), true);
context.getSource().sendFeedback(() -> Text.translatable("set_day").append(" ").append(String.valueOf(value)), true);

return 1;
}
Expand All @@ -60,7 +60,7 @@ var record = context.getSource().getPlayer().getComponent(ModComponents.RECORD_D
record.setRecordDay(days);
}

context.getSource().sendFeedback(() -> Text.translatable("set_day_with_target", target.getName(), value), true);
context.getSource().sendFeedback(() -> Text.translatable("set_day_with_target").append(" ").append(target.getName()).append(" ").append("were_set_to").append(" ").append(String.valueOf(value)), true);

return 1;
}
Expand All @@ -71,7 +71,7 @@ var record = context.getSource().getPlayer().getComponent(ModComponents.RECORD_D

record.setRecordDay(value);

context.getSource().sendFeedback(() -> Text.translatable("set_record_day", value), true);
context.getSource().sendFeedback(() -> Text.translatable("set_record_day").append(" ").append(String.valueOf(value)), true);

return 1;
}
Expand All @@ -83,7 +83,7 @@ private static int setRecordDayWithTarget(CommandContext<ServerCommandSource> co
var record = target.getComponent(ModComponents.RECORD_DAY);
record.setRecordDay(value);

context.getSource().sendFeedback(() -> Text.translatable("set_record_day_with_target", target.getName(), value), true);
context.getSource().sendFeedback(() -> Text.translatable("set_record_day_with_target").append(" ").append(target.getName()).append(" ").append("were_set_to").append(" ").append(String.valueOf(value)), true);

return 1;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.anvian.record_days_survived.util;

import net.anvian.record_days_survived.components.ModComponents;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.LivingEntity;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;

public class DaysUtil {
public static void dayPassed(LivingEntity entity) {
Expand All @@ -20,7 +20,7 @@ var record = entity.getComponent(ModComponents.RECORD_DAY);
recordDay = record.getRecordDay();

if (days == 5 || days % 10 == 0) {
entity.sendMessage(Text.of(I18n.translate("record_notice", days)));
entity.sendMessage(Text.translatable("record_notice").append(" ").append(String.valueOf(days)).formatted(Formatting.YELLOW));
}

if (days > recordDay) {
Expand Down
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/de_de.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "Überlebte Tage Bericht:",
"report_day": "Tag: %d",
"report_record_day": "Rekordtag: %d",
"reset": "Ihre Tage werden zurückgesetzt",
"record_notice": "§EWEW -Aufzeichnung! Tage überlebten %d",
"set_day": "Die Tage wurden auf %d eingestellt",
"set_day_with_target": "Die Tage von %d wurden auf %d eingestellt",
"set_record_day": "Der Rekordtag wurde auf %d eingestellt",
"set_record_day_with_target": "Der Rekordtag von %d wurde auf %d eingestellt"
"title_report": "Bericht über überlebte Tage",
"report_day": "Tag",
"report_record_day": "Rekordtag",
"reset": "Deine Tage beginnen von Neuem",
"record_notice": "Neuer Rekord! Tage überlebt",
"set_day": "Die Tage waren festgelegt auf",
"set_record_day": "Der Rekordtag war angesetzt auf",
"set_day_with_target": "Die Tage von",
"set_record_day_with_target": "Der Rekordtag von",
"were_set_to": "waren eingestellt auf"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report" : "Survived days report:",
"report_day" : "Day: %d",
"report_record_day" : "Record day: %d",
"reset" : "Your days are reset",
"record_notice" : "§eNew record! days survived %d",
"set_day" : "The days were set to %d",
"set_day_with_target" : "The days of %d were set to %d",
"set_record_day" : "The record day were set to %d",
"set_record_day_with_target" : "The record day of %d were set to %d"
"title_report" : "Survived days report",
"report_day" : "Day",
"report_record_day" : "Record day",
"reset" : "Your days are restarted",
"record_notice" : "New record! days survived",
"set_day" : "The days were set to",
"set_record_day" : "The record day were set to",
"set_day_with_target" : "The days of",
"set_record_day_with_target" : "The record day of",
"were_set_to" : "were set to"
}
18 changes: 10 additions & 8 deletions src/main/resources/assets/record_days_survived/lang/es_es.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"title_report" : "Reporte de días sobrevividos:",
"report_day" : "Día: %d",
"report_record_day" : "Record de días: %d",
"reset" : "Tus días fueron reiniciados",
"set_day" : "Los días se fijaron a %d",
"set_day_with_target" : "Los días de %d se fijaron a %d",
"set_record_day" : "El record de días se fijo a %d",
"set_record_day_with_target" : "El record de días de %d se fijo a %d"
"title_report": "Informe de días sobrevividos",
"report_day": "Día",
"report_record_day": "Día de récord",
"reset": "Tus días se reinician",
"record_notice": "¡Nuevo récord! Días sobrevividos",
"set_day": "Los días estaban fijados para",
"set_record_day": "El día récord se estableció",
"set_day_with_target": "Los dias de",
"set_record_day_with_target": "El día récord de",
"were_set_to": "Se establecieron para"
}
18 changes: 10 additions & 8 deletions src/main/resources/assets/record_days_survived/lang/es_mx.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"title_report" : "Reporte de días sobrevividos:",
"report_day" : "Día: %d",
"report_record_day" : "Record de días: %d",
"reset" : "Tus días fueron reiniciados",
"set_day" : "Los días se fijaron a %d",
"set_day_with_target" : "Los días de %d se fijaron a %d",
"set_record_day" : "El record de días se fijo a %d",
"set_record_day_with_target" : "El record de días de %d se fijo a %d"
"title_report": "Informe de días sobrevividos",
"report_day": "Día",
"report_record_day": "Día de récord",
"reset": "Tus días se reinician",
"record_notice": "¡Nuevo récord! Días sobrevividos",
"set_day": "Los días estaban fijados para",
"set_record_day": "El día récord se estableció",
"set_day_with_target": "Los dias de",
"set_record_day_with_target": "El día récord de",
"were_set_to": "Se establecieron para"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/fr_fr.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "Rapport des jours survécu:",
"report_day": "Jour: %d",
"report_record_day": "Journée des records: %d",
"reset": "Vos journées sont réinitialisées",
"record_notice": "§Enew Record! Les jours ont survécu à %d",
"set_day": "Les jours ont été fixés à %d",
"set_day_with_target": "Les jours de %d ont été fixés à %d",
"set_record_day": "La journée record a été fixée à %d",
"set_record_day_with_target": "Le jour record de %d a été fixé à %d"
"title_report": "Rapport des jours de survie",
"report_day": "Jour",
"report_record_day": "Journée record",
"reset": "Vos jours recommencent",
"record_notice": "Nouveau record ! jours survécus",
"set_day": "Les jours étaient fixés à",
"set_record_day": "Le jour du record a été fixé à",
"set_day_with_target": "Les jours de",
"set_record_day_with_target": "Le jour du record de",
"were_set_to": "étaient prêts à"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/it_it.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "Rapporto sui giorni sopravvissuti:",
"report_day": "Giorno: %d",
"report_record_day": "Giorno del record: %d",
"reset": "I tuoi giorni vengono ripristinati",
"record_notice": "§Rew Record! i giorni sono sopravvissuti %d",
"set_day": "I giorni erano impostati su %d",
"set_day_with_target": "I giorni di %d erano impostati su %d",
"set_record_day": "The record day were set to %d",
"set_record_day_with_target": "The record day of %d were set to %d"
"title_report": "Rapporto dei giorni sopravvissuti",
"report_day": "Giorno",
"report_record_day": "Giorno del record",
"reset": "I tuoi giorni ricominciano",
"record_notice": "Nuovo record! Giorni sopravvissuti",
"set_day": "I giorni erano stabiliti per",
"set_record_day": "Il giorno record è stato fissato per",
"set_day_with_target": "I giorni di",
"set_record_day_with_target": "Il giorno record di",
"were_set_to": "erano impostati su"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/ja_jp.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "生き残った日々の報告:",
"report_day": "日:%d",
"report_record_day": "記録日:%d",
"reset": "あなたの日はリセットされています",
"record_notice": "§ENEWレコード! 生き残った日%d",
"set_day": "日は%dに設定されました",
"set_day_with_target": "%dの日は%dに設定されました",
"set_record_day": "記録的な日は%dに設定されました",
"set_record_day_with_target": "%dの記録的な日は%dに設定されました"
"title_report": "生存日数レポート",
"report_day": "",
"report_record_day": "記録の日",
"reset": "あなたの日々は再開されます",
"record_notice": "新記録!生き残った日数",
"set_day": "日程は",
"set_record_day": "記録的な日は",
"set_day_with_target": "の日々",
"set_record_day_with_target": "記録的な日",
"were_set_to": "設定された"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/ko_kr.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "살아남은 날 보고서 :",
"report_day": "낮: %d",
"report_record_day": "기록적인 날: %d",
"reset": "당신의 날이 재설정됩니다",
"record_notice": "§Enew 레코드! 날이 살아 남았습니다. d",
"set_day": "날은 %d로 설정되었다",
"set_day_with_target": "%d의 일은 %d로 설정되었습니다.",
"set_record_day": "레코드 일은 %d로 설정되었다",
"set_record_day_with_target": "%d의 레코드 일은 %d로 설정되었습니다."
"title_report": "생존일 보고서",
"report_day": "",
"report_record_day": "기록의 날",
"reset": "당신의 하루가 다시 시작됩니다",
"record_notice": "새로운 기록! 며칠 남았습니다",
"set_day": "날짜는 다음과 같이 설정되었습니다.",
"set_record_day": "기록의 날은 다음과 같이 설정되었습니다.",
"set_day_with_target": "의 날들",
"set_record_day_with_target": "기록의 날",
"were_set_to": "설정되었다"
}
12 changes: 12 additions & 0 deletions src/main/resources/assets/record_days_survived/lang/pl_pl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"title_report": "Raport o dniach przetrwania",
"report_day": "Dzień",
"report_record_day": "Dzień rekordowy",
"reset": "Twoje dni zaczynają się od nowa",
"record_notice": "Nowy rekord! dni przetrwały",
"set_day": "Dni zostały ustawione na",
"set_record_day": "Dzień rekordu został ustalony na",
"set_day_with_target": "Dni",
"set_record_day_with_target": "Dzień rekordowy",
"were_set_to": "zostały ustawione na"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/pt_br.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "Relatório de dias sobrevividos:",
"report_day": "Dia: %d",
"report_record_day": "Dia do registro: %d",
"reset": "Seus dias são redefinidos",
"record_notice": "§ Registro! dias sobreviveram %d",
"set_day": "Os dias foram definidos como %d",
"set_day_with_target": "Os dias de %d foram definidos como %d",
"set_record_day": "O dia recorde foi definido como %d",
"set_record_day_with_target": "O dia recorde de %d foi definido como %d"
"title_report": "Relatório de dias sobrevividos",
"report_day": "Dia",
"report_record_day": "Dia do recorde",
"reset": "Seus dias são reiniciados",
"record_notice": "Novo recorde! dias sobrevivido",
"set_day": "Os dias foram definidos para",
"set_record_day": "O dia recorde foi definido para",
"set_day_with_target": "Os dias de",
"set_record_day_with_target": "O dia recorde de",
"were_set_to": "foram definidos para"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/ru_ru.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "Отчет о выживших днях:",
"report_day": "День: %d",
"report_record_day": "Запись день: %d",
"reset": "Ваши дни сброшены",
"record_notice": "§Enew record! Дни выжили %d",
"set_day": "Дни были установлены в %d",
"set_day_with_target": "Дни %D были установлены в %d",
"set_record_day": "Рекордный день был установлен в %d",
"set_record_day_with_target": "Рекорд День %D был установлен в %d"
"title_report": "Отчет о выживших днях",
"report_day": "День",
"report_record_day": "Рекордный день",
"reset": "Ваши дни начинаются заново.",
"record_notice": "Новый рекорд! дней выжили",
"set_day": "Дни были установлены",
"set_record_day": "Рекордный день был установлен",
"set_day_with_target": "Дни",
"set_record_day_with_target": "Рекордный день",
"were_set_to": "были установлены на"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/uk_ua.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "Вижили Дні доповіді:",
"report_day": "День: %d",
"report_record_day": "День запису: %d",
"reset": "Ваші дні скидаються",
"record_notice": "§Enew Record! дні пережили %d",
"set_day": "Дні були встановлені на %d",
"set_day_with_target": "Дні %d були встановлені на %d",
"set_record_day": "Рекордний день був встановлений на %d",
"set_record_day_with_target": "Рекордний день D %d був встановлений на %d"
"title_report": "Звіт про пережиті дні",
"report_day": "День",
"report_record_day": "Рекордний день",
"reset": "Ваші дні починаються знову",
"record_notice": "Новий рекорд! днів пережив",
"set_day": "Дні були встановлені",
"set_record_day": "Рекордний день був встановлений",
"set_day_with_target": "Дні",
"set_record_day_with_target": "Рекордний день",
"were_set_to": "були встановлені"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/zh_cn.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "生存的日子报告:",
"report_day": "天:%d",
"report_record_day": "记录日:%d",
"reset": "您的日子是重置的",
"record_notice": "§启动记录! 天生幸存%d",
"set_day": "日子设置为%d",
"set_day_with_target": "%d的天数设置为%d",
"set_record_day": "创纪录的一天设置为%d",
"set_record_day_with_target": "D%d的创纪录日设置为%d"
"title_report": "存活天数报告",
"report_day": "",
"report_record_day": "纪录日",
"reset": "你的日子重新开始",
"record_notice": "新纪录!存活天数",
"set_day": "日期定为",
"set_record_day": "创纪录的日子定于",
"set_day_with_target": "的日子",
"set_record_day_with_target": "创纪录的一天",
"were_set_to": "被设置为"
}
19 changes: 10 additions & 9 deletions src/main/resources/assets/record_days_survived/lang/zh_tw.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"title_report": "生存的日子報告:",
"report_day": "天:%d",
"report_record_day": "記錄日:%d",
"reset": "您的日子是重置的",
"record_notice": "§啟動記錄! 天生倖存%d",
"set_day": "日子設置為%d",
"set_day_with_target": "%d的天數設置為%d",
"set_record_day": "創紀錄的一天設置為%d",
"set_record_day_with_target": "D%d的創紀錄日設置為%d"
"title_report": "生存天數報告",
"report_day": "",
"report_record_day": "記錄日",
"reset": "你的日子又重新開始了",
"record_notice": "新紀錄!倖存天數",
"set_day": "日子定為",
"set_record_day": "記錄日定為",
"set_day_with_target": "的日子",
"set_record_day_with_target": "記錄日為",
"were_set_to": "被設定為"
}

0 comments on commit 18ce05d

Please sign in to comment.