use better short date translations
This commit is contained in:
parent
de4d4e0bcb
commit
841f85a743
|
@ -6,6 +6,7 @@
|
||||||
* Added config option to disable console colors.
|
* Added config option to disable console colors.
|
||||||
* SMAPI now prevents more errors/crashes due to invalid item data.
|
* SMAPI now prevents more errors/crashes due to invalid item data.
|
||||||
* Updated compatibility list.
|
* Updated compatibility list.
|
||||||
|
* Improved translations.¹
|
||||||
|
|
||||||
* For the Console Commands mod:
|
* For the Console Commands mod:
|
||||||
* The date commands like `world_setday` now also set the `daysPlayed` stat, so in-game events/randomization match what you'd get if you played to that date normally (thanks to kdau!).
|
* The date commands like `world_setday` now also set the `daysPlayed` stat, so in-game events/randomization match what you'd get if you played to that date normally (thanks to kdau!).
|
||||||
|
@ -15,10 +16,13 @@
|
||||||
* Fixed rare intermittent "CGI application encountered an error" errors.
|
* Fixed rare intermittent "CGI application encountered an error" errors.
|
||||||
|
|
||||||
* For modders:
|
* For modders:
|
||||||
* Extended `SDate` with `SeasonIndex`, `FromDaysSinceStart`, `FromWorldDate`, `ToWorldDate`, and `ToLocaleString` fields/methods (thanks to kdau!).
|
* Added `SDate` fields/methods: `SeasonIndex`, `FromDaysSinceStart`, `FromWorldDate`, `ToWorldDate`, and `ToLocaleString` (thanks to kdau!).
|
||||||
|
* Added `SDate` translations taken from the Lookup Anything mod.¹
|
||||||
* Fixed asset propagation on Linux/Mac for monster sprites, NPC dialogue, and NPC schedules.
|
* Fixed asset propagation on Linux/Mac for monster sprites, NPC dialogue, and NPC schedules.
|
||||||
* Fixed asset propagation for NPC dialogue sometimes causing a spouse to skip marriage dialogue or not allow kisses.
|
* Fixed asset propagation for NPC dialogue sometimes causing a spouse to skip marriage dialogue or not allow kisses.
|
||||||
|
|
||||||
|
¹ Date translations were taken from the Lookup Anything mod; thanks to FixThisPlz (improved Russian), LeecanIt (added Italian), pomepome (added Japanese), S2SKY (added Korean), Sasara (added German), SteaNN (added Russian), ThomasGabrielDelavault (added Spanish), VincentRoth (added French), Yllelder (improved Spanish), and yuwenlan (added Chinese). Translations for Korean (partial), Hungarian, and Turkish were auto-generated based on the game translations.
|
||||||
|
|
||||||
## 3.4.1
|
## 3.4.1
|
||||||
Released 24 March 2020 for Stardew Valley 1.4.1 or later.
|
Released 24 March 2020 for Stardew Valley 1.4.1 or later.
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ using StardewModdingAPI.Toolkit.Framework.Clients.WebApi;
|
||||||
using StardewModdingAPI.Toolkit.Framework.ModData;
|
using StardewModdingAPI.Toolkit.Framework.ModData;
|
||||||
using StardewModdingAPI.Toolkit.Serialization;
|
using StardewModdingAPI.Toolkit.Serialization;
|
||||||
using StardewModdingAPI.Toolkit.Utilities;
|
using StardewModdingAPI.Toolkit.Utilities;
|
||||||
|
using StardewModdingAPI.Utilities;
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
using Object = StardewValley.Object;
|
using Object = StardewValley.Object;
|
||||||
using ThreadState = System.Threading.ThreadState;
|
using ThreadState = System.Threading.ThreadState;
|
||||||
|
@ -176,6 +177,8 @@ namespace StardewModdingAPI.Framework
|
||||||
|
|
||||||
SCore.DeprecationManager = new DeprecationManager(this.Monitor, this.ModRegistry);
|
SCore.DeprecationManager = new DeprecationManager(this.Monitor, this.ModRegistry);
|
||||||
|
|
||||||
|
SDate.Translations = this.Translator;
|
||||||
|
|
||||||
// redirect direct console output
|
// redirect direct console output
|
||||||
if (this.MonitorForGame.WriteToConsole)
|
if (this.MonitorForGame.WriteToConsole)
|
||||||
this.ConsoleManager.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message);
|
this.ConsoleManager.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message);
|
||||||
|
|
|
@ -143,7 +143,7 @@ namespace StardewModdingAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
// load SMAPI
|
// load SMAPI
|
||||||
using (SCore core = new SCore(modsPath, writeToConsole))
|
using SCore core = new SCore(modsPath, writeToConsole);
|
||||||
core.RunInteractively();
|
core.RunInteractively();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using StardewModdingAPI.Framework;
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
|
|
||||||
namespace StardewModdingAPI.Utilities
|
namespace StardewModdingAPI.Utilities
|
||||||
|
@ -19,6 +20,9 @@ namespace StardewModdingAPI.Utilities
|
||||||
/// <summary>The number of days in a season.</summary>
|
/// <summary>The number of days in a season.</summary>
|
||||||
private readonly int DaysInSeason = 28;
|
private readonly int DaysInSeason = 28;
|
||||||
|
|
||||||
|
/// <summary>The core SMAPI translations.</summary>
|
||||||
|
internal static Translator Translations;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Accessors
|
** Accessors
|
||||||
|
@ -126,16 +130,31 @@ namespace StardewModdingAPI.Utilities
|
||||||
return new WorldDate(this.Year, this.Season, this.Day);
|
return new WorldDate(this.Year, this.Season, this.Day);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Get a string representation of the date. This is mainly intended for debugging or console messages.</summary>
|
/// <summary>Get an untranslated string representation of the date. This is mainly intended for debugging or console messages.</summary>
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{this.Day:00} {this.Season} Y{this.Year}";
|
return $"{this.Day:00} {this.Season} Y{this.Year}";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Get a translated string representation of the date in the current game locale.</summary>
|
/// <summary>Get a translated string representation of the date in the current game locale.</summary>
|
||||||
public string ToLocaleString()
|
/// <param name="withYear">Whether to get a string which includes the year number.</param>
|
||||||
|
public string ToLocaleString(bool withYear = true)
|
||||||
{
|
{
|
||||||
return Utility.getDateStringFor(this.Day, this.SeasonIndex, this.Year);
|
// get fallback translation from game
|
||||||
|
string fallback = Utility.getDateStringFor(this.Day, this.SeasonIndex, this.Year);
|
||||||
|
if (SDate.Translations == null)
|
||||||
|
return fallback;
|
||||||
|
|
||||||
|
// get short format
|
||||||
|
string seasonName = Utility.getSeasonNameFromNumber(this.SeasonIndex);
|
||||||
|
return SDate.Translations
|
||||||
|
.Get(withYear ? "generic.date-with-year" : "generic.date", new
|
||||||
|
{
|
||||||
|
day = this.Day,
|
||||||
|
year = this.Year,
|
||||||
|
season = Utility.getSeasonNameFromNumber(this.SeasonIndex)
|
||||||
|
})
|
||||||
|
.Default(fallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****
|
/****
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Ungültiger Inhalt wurde entfernt, um einen Absturz zu verhindern (siehe SMAPI Konsole für weitere Informationen)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Ungültiger Inhalt wurde entfernt, um einen Absturz zu verhindern (siehe SMAPI Konsole für weitere Informationen).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}} {{day}}",
|
||||||
|
"generic.date-with-year": "{{season}} {{day}} im Jahr {{year}}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Invalid content was removed to prevent a crash (see the SMAPI console for info)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Invalid content was removed to prevent a crash (see the SMAPI console for info).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}} {{day}}",
|
||||||
|
"generic.date-with-year": "{{season}} {{day}} in year {{year}}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Se ha quitado contenido inválido para evitar un cierre forzoso (revisa la consola de SMAPI para más información)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Se ha quitado contenido inválido para evitar un cierre forzoso (revisa la consola de SMAPI para más información).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}} {{day}}",
|
||||||
|
"generic.date-with-year": "{{season}} {{day}} del año {{year}}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Le contenu non valide a été supprimé afin d'éviter un plantage (voir la console de SMAPI pour plus d'informations)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Le contenu non valide a été supprimé afin d'éviter un plantage (voir la console de SMAPI pour plus d'informations).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{day}} {{season}}",
|
||||||
|
"generic.date-with-year": "{{day}} {{season}} de l'année {{year}}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Érvénytelen elemek kerültek eltávolításra, hogy a játék ne omoljon össze (további információk a SMAPI konzolon)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Érvénytelen elemek kerültek eltávolításra, hogy a játék ne omoljon össze (további információk a SMAPI konzolon).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}} {{day}}",
|
||||||
|
"generic.date-with-year": "{{year}}. év {{season}} {{day}}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Contenuto non valido rimosso per prevenire un crash (Guarda la console di SMAPI per maggiori informazioni)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Contenuto non valido rimosso per prevenire un crash (Guarda la console di SMAPI per maggiori informazioni).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{day}} {{season}}",
|
||||||
|
"generic.date-with-year": "{{day}} {{season}} dell'anno {{year}}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "クラッシュを防ぐために無効なコンテンツを取り除きました (詳細はSMAPIコンソールを参照)"
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "クラッシュを防ぐために無効なコンテンツを取り除きました (詳細はSMAPIコンソールを参照)",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}} {{day}}日",
|
||||||
|
"generic.date-with-year": "{{year}}年目 {{season}} {{day}}日"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "충돌을 방지하기 위해 잘못된 컨텐츠가 제거되었습니다 (자세한 내용은 SMAPI 콘솔 참조).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}} {{day}}",
|
||||||
|
"generic.date-with-year": "{{year}} 학년 {{season}} {{day}}"
|
||||||
|
}
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Conteúdo inválido foi removido para prevenir uma falha (veja o console do SMAPI para mais informações)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Conteúdo inválido foi removido para prevenir uma falha (veja o console do SMAPI para mais informações).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}} {{day}}",
|
||||||
|
"generic.date-with-year": "{{season}} {{day}} no ano {{year}}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Недопустимое содержимое было удалено, чтобы предотвратить сбой (см. информацию в консоли SMAPI)"
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Недопустимое содержимое было удалено, чтобы предотвратить сбой (см. информацию в консоли SMAPI)",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}}, {{day}}-е число",
|
||||||
|
"generic.date-with-year": "{{season}}, {{day}}-е число, {{year}}-й год"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "Yanlış paketlenmiş bir içerik, oyunun çökmemesi için yüklenmedi (SMAPI konsol penceresinde detaylı bilgi mevcut)."
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "Yanlış paketlenmiş bir içerik, oyunun çökmemesi için yüklenmedi (SMAPI konsol penceresinde detaylı bilgi mevcut).",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{day}} {{season}}",
|
||||||
|
"generic.date-with-year": "{{day}} {{season}} года {{year}}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"warn.invalid-content-removed": "非法内容已移除以防游戏闪退(查看SMAPI控制台获得更多信息)"
|
// error messages
|
||||||
|
"warn.invalid-content-removed": "非法内容已移除以防游戏闪退(查看SMAPI控制台获得更多信息)",
|
||||||
|
|
||||||
|
// short date format for SDate
|
||||||
|
"generic.date": "{{season}}{{day}}日",
|
||||||
|
"generic.date-with-year": "第{{year}}年{{season}}{{day}}日"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue