Remove Latin

This commit is contained in:
2026-06-07 20:12:43 +01:00
parent 63b0992343
commit f489171261
29 changed files with 12507 additions and 2167 deletions

View File

@@ -41,7 +41,7 @@ The translation service implements a fallback chain:
=== Supported Languages
Translations are produced for the following eight languages, identified by ISO 639-3 codes and mapped to NLLB language tags:
Translations are produced for the following seven languages, identified by ISO 639-3 codes and mapped to NLLB language tags:
[cols="^1,^2,^2", options="header"]
|===
@@ -53,7 +53,6 @@ Translations are produced for the following eight languages, identified by ISO 6
| fra | French | fra_Latn
| ita | Italian | ita_Latn
| nld | Dutch | nld_Latn
| lat | Latin | lat_Latn
| por | Portuguese | por_Latn
|===

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marechai.Database.Migrations
{
/// <inheritdoc />
public partial class RemoveLatinTranslations : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
// Description tables
migrationBuilder.Sql("DELETE FROM `CompanyDescriptions` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `GpuDescriptions` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `MachineDescriptions` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `PersonDescriptions` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `ProcessorDescriptions` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `SoftwareDescriptions` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `SoundSynthDescriptions` WHERE `LanguageCode` = 'lat';");
// Synopsis tables
migrationBuilder.Sql("DELETE FROM `BookSynopses` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `DocumentSynopses` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `MagazineSynopses` WHERE `LanguageCode` = 'lat';");
// Translation tables
migrationBuilder.Sql("DELETE FROM `SoftwareGenreTranslations` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `SoftwareAttributeStringTranslations` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `SoftwareCoverCaptionTranslations` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `SoftwarePromoArtGroupTranslations` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `SoftwareScreenshotCaptionTranslations` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `SoftwareScreenshotGroupTranslations` WHERE `LanguageCode` = 'lat';");
migrationBuilder.Sql("DELETE FROM `PeopleBySoftwareRoleTranslations` WHERE `LanguageCode` = 'lat';");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
// Latin translations were AI-generated and can be re-created if Latin is ever re-added.
}
}
}

View File

@@ -83,7 +83,6 @@ public static class LanguageResolver
"fr" => "fra",
"it" => "ita",
"nl" => "nld",
"la" => "lat",
"pt" => "por",
_ => null
};

View File

@@ -59,7 +59,6 @@ public static class UiLanguage
"fr" => "fra",
"it" => "ita",
"nl" => "nld",
"la" => "lat",
"pt" => "por",
_ => "eng"
};

View File

@@ -431,7 +431,6 @@ public partial class Profile
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -108,7 +108,6 @@
<MudSelectItem T="string" Value="@("deu")">Deutsch</MudSelectItem>
<MudSelectItem T="string" Value="@("fra")">Français</MudSelectItem>
<MudSelectItem T="string" Value="@("por")">Português</MudSelectItem>
<MudSelectItem T="string" Value="@("lat")">Latin</MudSelectItem>
</MudSelect>
@if(TranslationService.IsAvailable)
@@ -651,7 +650,6 @@
"deu" => "Deutsch",
"fra" => "Français",
"por" => "Português",
"lat" => "Latin",
_ => code ?? "?"
};

View File

@@ -112,7 +112,6 @@
("deu", "German"),
("fra", "French"),
("ita", "Italian"),
("lat", "Latin"),
("por", "Portuguese")
];

View File

@@ -72,7 +72,6 @@
<MudSelectItem T="string" Value="@("deu")">Deutsch</MudSelectItem>
<MudSelectItem T="string" Value="@("fra")">Français</MudSelectItem>
<MudSelectItem T="string" Value="@("por")">Português</MudSelectItem>
<MudSelectItem T="string" Value="@("lat")">Latin</MudSelectItem>
</MudSelect>
@if(TranslationService.IsAvailable)
@@ -513,7 +512,6 @@
"deu" => "Deutsch",
"fra" => "Français",
"por" => "Português",
"lat" => "Latin",
_ => code ?? "?"
};

View File

@@ -112,7 +112,6 @@
("deu", "German"),
("fra", "French"),
("ita", "Italian"),
("lat", "Latin"),
("por", "Portuguese")
];

View File

@@ -112,7 +112,6 @@
("deu", "German"),
("fra", "French"),
("ita", "Italian"),
("lat", "Latin"),
("por", "Portuguese")
];

View File

@@ -85,7 +85,6 @@
<MudSelectItem T="string" Value="@("fra")">Français</MudSelectItem>
<MudSelectItem T="string" Value="@("ita")">Italiano</MudSelectItem>
<MudSelectItem T="string" Value="@("por")">Português</MudSelectItem>
<MudSelectItem T="string" Value="@("lat")">Latin</MudSelectItem>
</MudSelect>
@if(TranslationService.IsAvailable)
@@ -319,7 +318,6 @@
"deu" => "Deutsch",
"fra" => "Français",
"por" => "Português",
"lat" => "Latin",
_ => code ?? "?"
};

View File

@@ -112,7 +112,6 @@
("deu", "German"),
("fra", "French"),
("ita", "Italian"),
("lat", "Latin"),
("por", "Portuguese")
];

View File

@@ -112,7 +112,6 @@
("deu", "German"),
("fra", "French"),
("ita", "Italian"),
("lat", "Latin"),
("por", "Portuguese")
];

View File

@@ -112,7 +112,6 @@
("deu", "German"),
("fra", "French"),
("ita", "Italian"),
("lat", "Latin"),
("por", "Portuguese")
];

View File

@@ -112,7 +112,6 @@
("deu", "German"),
("fra", "French"),
("ita", "Italian"),
("lat", "Latin"),
("por", "Portuguese")
];

View File

@@ -214,7 +214,6 @@ else
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -274,7 +274,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -268,7 +268,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -244,7 +244,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -299,7 +299,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -345,7 +345,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -241,7 +241,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -239,7 +239,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -280,7 +280,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -654,7 +654,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -292,7 +292,6 @@ public partial class View
"deu" => "German",
"fra" => "French",
"ita" => "Italian",
"lat" => "Latin",
"por" => "Portuguese",
_ => iso639_3
};

View File

@@ -82,9 +82,9 @@
/// </summary>
[Parameter] public string DefaultLanguage { get; set; } = "eng";
// The 6 fully-supported UI languages, plus lat/por which exist server-side. Latin and
// Portuguese are only shown when the entity already has a description in them OR the
// user's UI language happens to be one of them (rare). Keep them out of the default list.
// The 6 fully-supported UI languages, plus por which exists server-side. Portuguese
// is only shown when the entity already has a description in it OR the user's UI
// language happens to be Portuguese (rare). Keep it out of the default list.
static readonly (string Code, string NameKey)[] _baseLanguages =
[
("eng", "English"),
@@ -101,12 +101,9 @@
{
_languageOptions = new List<(string, string)>(_baseLanguages);
// Include lat/por only if relevant (already has a description, or user's UI language).
foreach(string extra in new[] { "lat", "por" })
{
if(ExistingLanguages?.Contains(extra) == true || DefaultLanguage == extra)
_languageOptions.Add((extra, extra == "lat" ? "Latin" : "Portuguese"));
}
// Include por only if relevant (already has a description, or user's UI language).
if(ExistingLanguages?.Contains("por") == true || DefaultLanguage == "por")
_languageOptions.Add(("por", "Portuguese"));
}
void Choose(string code) => MudDialog.Close(DialogResult.Ok(code));