mirror of
https://github.com/claunia/marechai.git
synced 2026-07-08 17:57:08 +00:00
Remove Latin
This commit is contained in:
@@ -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
12457
Marechai.Database/Migrations/20260607183529_RemoveLatinTranslations.Designer.cs
generated
Normal file
12457
Marechai.Database/Migrations/20260607183529_RemoveLatinTranslations.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,6 @@ public static class LanguageResolver
|
||||
"fr" => "fra",
|
||||
"it" => "ita",
|
||||
"nl" => "nld",
|
||||
"la" => "lat",
|
||||
"pt" => "por",
|
||||
_ => null
|
||||
};
|
||||
|
||||
@@ -59,7 +59,6 @@ public static class UiLanguage
|
||||
"fr" => "fra",
|
||||
"it" => "ita",
|
||||
"nl" => "nld",
|
||||
"la" => "lat",
|
||||
"pt" => "por",
|
||||
_ => "eng"
|
||||
};
|
||||
|
||||
@@ -431,7 +431,6 @@ public partial class Profile
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -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 ?? "?"
|
||||
};
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
("deu", "German"),
|
||||
("fra", "French"),
|
||||
("ita", "Italian"),
|
||||
("lat", "Latin"),
|
||||
("por", "Portuguese")
|
||||
];
|
||||
|
||||
|
||||
@@ -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 ?? "?"
|
||||
};
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
("deu", "German"),
|
||||
("fra", "French"),
|
||||
("ita", "Italian"),
|
||||
("lat", "Latin"),
|
||||
("por", "Portuguese")
|
||||
];
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
("deu", "German"),
|
||||
("fra", "French"),
|
||||
("ita", "Italian"),
|
||||
("lat", "Latin"),
|
||||
("por", "Portuguese")
|
||||
];
|
||||
|
||||
|
||||
@@ -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 ?? "?"
|
||||
};
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
("deu", "German"),
|
||||
("fra", "French"),
|
||||
("ita", "Italian"),
|
||||
("lat", "Latin"),
|
||||
("por", "Portuguese")
|
||||
];
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
("deu", "German"),
|
||||
("fra", "French"),
|
||||
("ita", "Italian"),
|
||||
("lat", "Latin"),
|
||||
("por", "Portuguese")
|
||||
];
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
("deu", "German"),
|
||||
("fra", "French"),
|
||||
("ita", "Italian"),
|
||||
("lat", "Latin"),
|
||||
("por", "Portuguese")
|
||||
];
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
("deu", "German"),
|
||||
("fra", "French"),
|
||||
("ita", "Italian"),
|
||||
("lat", "Latin"),
|
||||
("por", "Portuguese")
|
||||
];
|
||||
|
||||
|
||||
@@ -214,7 +214,6 @@ else
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -274,7 +274,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -268,7 +268,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -244,7 +244,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -299,7 +299,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -345,7 +345,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -241,7 +241,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -239,7 +239,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -280,7 +280,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -654,7 +654,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -292,7 +292,6 @@ public partial class View
|
||||
"deu" => "German",
|
||||
"fra" => "French",
|
||||
"ita" => "Italian",
|
||||
"lat" => "Latin",
|
||||
"por" => "Portuguese",
|
||||
_ => iso639_3
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user