Skip to content

Commit

Permalink
Merge pull request #160 from SpicyDarkFox/dbg
Browse files Browse the repository at this point in the history
фикс переводов
  • Loading branch information
SpicyDarkFox authored Sep 18, 2024
2 parents 05caef4 + d45336a commit bceb45d
Show file tree
Hide file tree
Showing 14 changed files with 247 additions and 105 deletions.
10 changes: 6 additions & 4 deletions Content.Client/Construction/UI/ConstructionMenuPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool WindowOpen
else
_constructionView.OpenCentered();

if(_selected != null)
if (_selected != null)
PopulateInfo(_selected);
}
else
Expand Down Expand Up @@ -171,7 +171,7 @@ private void OnViewPopulateRecipes(object? sender, (string search, string catago
if (recipe.Category != category)
continue;
}

recipe.Name = Loc.TryGetString($"construction-graph-name-{recipe.ID}", out var name) ? name : recipe.Name;
recipes.Add(recipe);
}

Expand Down Expand Up @@ -218,7 +218,9 @@ private void PopulateInfo(ConstructionPrototype prototype)
{
var spriteSys = _systemManager.GetEntitySystem<SpriteSystem>();
_constructionView.ClearRecipeInfo();
_constructionView.SetRecipeInfo(prototype.Name, prototype.Description, spriteSys.Frame0(prototype.Icon), prototype.Type != ConstructionType.Item);
_constructionView.SetRecipeInfo(Loc.TryGetString($"construction-graph-name-{prototype.ID}", out var name) ? name : prototype.Name,
Loc.TryGetString($"construction-graph-desc-{prototype.ID}", out var desc) ? desc : prototype.Description,
spriteSys.Frame0(prototype.Icon), prototype.Type != ConstructionType.Item);

var stepList = _constructionView.RecipeStepList;
GenerateStepList(prototype, stepList);
Expand All @@ -236,7 +238,7 @@ private void GenerateStepList(ConstructionPrototype prototype, ItemList stepList
var text = entry.Arguments != null
? Loc.GetString(entry.Localization, entry.Arguments) : Loc.GetString(entry.Localization);

if (entry.EntryNumber is {} number)
if (entry.EntryNumber is { } number)
{
text = Loc.GetString("construction-presenter-step-wrapper",
("step-number", number), ("text", text));
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/RandomMetadata/RandomMetadataSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Dataset;
using Content.Shared.Dataset;
using JetBrains.Annotations;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
Expand Down Expand Up @@ -48,9 +48,9 @@ public string GetRandomFromSegments(List<string> segments, string? separator)
foreach (var segment in segments)
{
if (_prototype.TryIndex<DatasetPrototype>(segment, out var proto))
outputSegments.Add(_random.Pick(proto.Values));
outputSegments.Add(Loc.GetString(_random.Pick(proto.Values)));
else if (Loc.TryGetString(segment, out var localizedSegment))
outputSegments.Add(localizedSegment);
outputSegments.Add(Loc.GetString(segment));
else
outputSegments.Add(segment);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public sealed partial class MaterialConstructionGraphStep : EntityInsertConstruc
{
// TODO: Make this use the material system.
// TODO TODO: Make the material system not shit.
[DataField("material", required:true, customTypeSerializer:typeof(PrototypeIdSerializer<StackPrototype>))]
[DataField("material", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<StackPrototype>))]
public string MaterialPrototypeId { get; private set; } = "Steel";

[DataField("amount")] public int Amount { get; private set; } = 1;
Expand Down Expand Up @@ -45,7 +45,7 @@ public override ConstructionGuideEntry GenerateGuideEntry()
return new ConstructionGuideEntry()
{
Localization = "construction-presenter-material-step",
Arguments = new (string, object)[]{("amount", Amount), ("material", material.Name)},
Arguments = new (string, object)[] { ("amount", Amount), ("material", Loc.TryGetString($"stack-name-{material.ID}", out var locname) ? locname : material.Name) },
Icon = material.Icon,
};
}
Expand Down
2 changes: 2 additions & 0 deletions Resources/Locale/ru-RU/_LostParadise/Construction/Graphs.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#construction-graph-name-<id> = <перевод>
#construction-graph-desc-<id> = <перевод>
149 changes: 149 additions & 0 deletions Resources/Locale/ru-RU/_LostParadise/stack/stacks.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
stack-name-LPPZipties = кабельные стяжки
stack-name-MetalRod = стержень
stack-name-Telecrystal = телекристалл
stack-name-PrizeTicket = призовой билет
stack-name-ArtifactFragment = фрагмент артефакта
stack-name-Credit = кредиты
stack-name-Fulton = фултон
stack-name-InflatableWall = надувная баррикада
stack-name-InflatableDoor = надувная дверь
stack-name-Pancake = блинчик
stack-name-PizzaBox = коробка пиццы
stack-name-PaperRolling = пачка сигаретной бумаги
stack-name-CigaretteFilter = сигаретный фильтр
stack-name-GroundTobacco = измельчённый табак
stack-name-GroundCannabis = измельчённая конопля
stack-name-LeavesTobaccoDried = сушёные листья табака
stack-name-LeavesCannabisDried = сушёные листья конопли
# материалы
stack-name-WoodPlank = деревяная доска
stack-name-Biomass = биомасса
stack-name-Cardboard = картон
stack-name-Cloth = ткань
stack-name-Durathread = дюраткань
stack-name-Diamond = алмаз
stack-name-Cotton = хлопок
stack-name-Bananium = бананиум
stack-name-MeatSheets = мясные пластины
stack-name-WebSilk = шёлк
stack-name-Bones = кость
stack-name-Gold = золотой слиток
stack-name-Silver = серебрянный слиток
stack-name-Paper = бумага
stack-name-Plasma = плазма
stack-name-Plastic = пластик
stack-name-Uranium = уран
stack-name-Steel = сталь
stack-name-Plasteel = пласталь
stack-name-Brass = бронза
stack-name-Bluespace = блюспейс кристал
stack-name-Glass = стекло
stack-name-ReinforcedGlass = бронестекло
stack-name-PlasmaGlass = плазменное стекло
stack-name-ReinforcedPlasmaGlass = плазменное бронестекло
stack-name-UraniumGlass = урановое стекло
# руды
stack-name-GoldOre = золотая руда
stack-name-SteelOre = железная руда
stack-name-PlasmaOre = плазменная руда
stack-name-SilverOre = серебрянная руда
stack-name-SpaceQuartz = космический кварц
stack-name-UraniumOre = урановая руда
stack-name-BananiumOre = бананиумовая руда
stack-name-Coal = уголь
stack-name-SaltOre = соль
# кабели
stack-name-Cable = НВ кабель
stack-name-CableMV = СВ кабель
stack-name-CableHV = ВВ кабель
# Медикаменты
stack-name-Ointment = мазь
stack-name-AloeCream = алоэ крем
stack-name-Gauze = марлевый бинт
stack-name-Brutepack = набор для ушибов
stack-name-Bloodpack = пакет крови
stack-name-MedicatedSuture = медицинская нить
stack-name-RegenerativeMesh = регенеративная сеть
# тайлы
stack-name-FloorTileGrassDark = плитка тёмной трава
stack-name-FloorTileGrassLight = плитка светлой трава
stack-name-FloorTileDirt = плитка грязи
stack-name-FloorTileBedrock = плитка коренной породы
# stack-name-FloorTileSteel
# stack-name-FloorTileMetalDiamond
# stack-name-FloorTileWood
# stack-name-FloorTileWhite
# stack-name-FloorTileDark
# stack-name-FloorTileTechmaint
# stack-name-FloorTileFreezer
# stack-name-FloorTileShowroom
# stack-name-FloorTileGCircuit
# stack-name-FloorTileGold
# stack-name-FloorTileReinforced
# stack-name-FloorTileMono
# stack-name-FloorTileBrassFilled
# stack-name-FloorTileBrassReebe
# stack-name-FloorTileLino
# stack-name-FloorTileHydro
# stack-name-FloorTileLime
# stack-name-FloorTileDirty
# stack-name-FloorTileStackShuttleWhite
# stack-name-FloorTileStackShuttleBlue
# stack-name-FloorTileStackShuttleOrange
# stack-name-FloorTileStackShuttlePurple
# stack-name-FloorTileStackShuttleRed
# stack-name-FloorTileStackShuttleGrey
# stack-name-FloorTileStackShuttleBlack
# stack-name-FloorTileStackEighties
# stack-name-FloorTileStackArcadeBlue
# stack-name-FloorTileStackArcadeBlue2
# stack-name-FloorTileStackArcadeRed
# stack-name-FloorCarpetRed
# stack-name-FloorCarpetBlack
# stack-name-FloorCarpetBlue
# stack-name-FloorCarpetGreen
# stack-name-FloorCarpetOrange
# stack-name-FloorCarpetSkyBlue
# stack-name-FloorCarpetPurple
# stack-name-FloorCarpetPink
# stack-name-FloorCarpetCyan
# stack-name-FloorCarpetWhite
# stack-name-FloorTileStackCarpetClown
# stack-name-FloorTileStackCarpetOffice
# stack-name-FloorTileStackBoxing
# stack-name-FloorTileStackGym
# stack-name-FloorTileElevatorShaft
# stack-name-FloorTileRockVault
# stack-name-FloorTileBlue
# stack-name-FloorTileMining
# stack-name-FloorTileMiningDark
# stack-name-FloorTileMiningLight
# stack-name-FloorTileBar
# stack-name-FloorTileClown
# stack-name-FloorTileMime
# stack-name-FloorTileKitchen
# stack-name-FloorTileLaundry
# stack-name-FloorTileConcrete
# stack-name-FloorTileGrayConcrete
# stack-name-FloorTileOldConcrete
# stack-name-FloorTileSilver
# stack-name-FloorTileBCircuit
# stack-name-FloorTileGrass
# stack-name-FloorTileGrassJungle
# stack-name-FloorTileSnow
# stack-name-FloorTileWoodPattern
# stack-name-FloorTileFlesh
# stack-name-FloorTileSteelMaint
# stack-name-FloorTileGratingMaint
# stack-name-FloorTileWeb
# stack-name-FloorTileAstroGrass
# stack-name-FloorTileMowedAstroGrass
# stack-name-FloorTileJungleAstroGrass
# stack-name-FloorTileAstroIce
# stack-name-FloorTileAstroSnow
# stack-name-FloorTileWoodLarge
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ chat-speech-verb-vulpkanin-1 = рычит
chat-speech-verb-vulpkanin-2 = лает
chat-speech-verb-vulpkanin-3 = гавкает
chat-speech-verb-vulpkanin-4 = тяфкает
chat-speech-verb-name-felinid = Феленид
chat-speech-verb-name-felinid = Фелинид
chat-speech-verb-felinid-1 = шипит
chat-speech-verb-felinid-2 = мурлыкает
chat-speech-verb-felinid-3 = мяукает
Expand Down
8 changes: 0 additions & 8 deletions Resources/Locale/ru-RU/lathe/recipes.ftl

This file was deleted.

2 changes: 1 addition & 1 deletion Resources/Locale/ru-RU/nyanotrasen/species/species.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
species-name-oni = Они
species-name-felinid = Феленид
species-name-felinid = Фелинид
124 changes: 62 additions & 62 deletions Resources/Locale/ru-RU/paper/story-generation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -51,70 +51,70 @@ story-gen-book-appearance24 = тиснёный
story-gen-book-appearance25 = неправильный
story-gen-book-appearance26 = позолоченный
story-gen-book-appearance27 = странный
story-gen-book-character1 = клоун
story-gen-book-character2 = мим
story-gen-book-character3 = репортёр
story-gen-book-character4 = мясник
story-gen-book-character5 = бармен
story-gen-book-character6 = уборщик
story-gen-book-character7 = инженер
story-gen-book-character8 = учёный
story-gen-book-character9 = стражник
story-gen-book-character10 = врач
story-gen-book-character11 = химик
story-gen-book-character12 = заключённый
story-gen-book-character13 = исследователь
story-gen-book-character14 = торговец
story-gen-book-character15 = капитан
story-gen-book-character16 = унатх
story-gen-book-character17 = ниан
story-gen-book-character18 = диона
story-gen-book-character19 = кошкомальчик
story-gen-book-character20 = кот
story-gen-book-character1 = клоуне
story-gen-book-character2 = миме
story-gen-book-character3 = репортёре
story-gen-book-character4 = мяснике
story-gen-book-character5 = бармене
story-gen-book-character6 = уборщике
story-gen-book-character7 = инженере
story-gen-book-character8 = учёном
story-gen-book-character9 = стражнике
story-gen-book-character10 = враче
story-gen-book-character11 = химике
story-gen-book-character12 = заключённом
story-gen-book-character13 = исследователе
story-gen-book-character14 = торговце
story-gen-book-character15 = капитане
story-gen-book-character16 = унатхе
story-gen-book-character17 = ниане
story-gen-book-character18 = дионе
story-gen-book-character19 = кошкомальчике
story-gen-book-character20 = коте
story-gen-book-character21 = корги
story-gen-book-character22 = пёс
story-gen-book-character23 = опоссум
story-gen-book-character24 = ленивец
story-gen-book-character25 = агент Синдиката
story-gen-book-character26 = ревенант
story-gen-book-character27 = крысиный король
story-gen-book-character22 = псе
story-gen-book-character23 = опоссуме
story-gen-book-character24 = ленивце
story-gen-book-character25 = агенте Синдиката
story-gen-book-character26 = ревенанте
story-gen-book-character27 = крысином короле
story-gen-book-character28 = ниндзя
story-gen-book-character29 = космический дракон
story-gen-book-character30 = революционер
story-gen-book-character31 = ядерный оперативник
story-gen-book-character32 = культист Нар'си
story-gen-book-character33 = культист Ратвара
story-gen-book-character34 = грейтайдер
story-gen-book-character35 = арахнид
story-gen-book-character36 = вокс
story-gen-book-character37 = дворф
story-gen-book-character38 = вор
story-gen-book-character39 = волшебник
story-gen-book-character40 = слайм
story-gen-book-character-trait1 = глупый
story-gen-book-character-trait2 = умный
story-gen-book-character-trait3 = смешной
story-gen-book-character-trait4 = привлекательный
story-gen-book-character-trait5 = очаровательный
story-gen-book-character-trait6 = противный
story-gen-book-character-trait7 = умирающий
story-gen-book-character-trait8 = старый
story-gen-book-character-trait9 = молодой
story-gen-book-character-trait10 = богатый
story-gen-book-character-trait11 = бедный
story-gen-book-character-trait12 = популярный
story-gen-book-character-trait13 = рассеянный
story-gen-book-character-trait14 = суровый
story-gen-book-character-trait15 = харизматичный
story-gen-book-character-trait16 = стоический
story-gen-book-character-trait17 = милый
story-gen-book-character-trait18 = дворфийский
story-gen-book-character-trait19 = пахнущий пивом
story-gen-book-character-trait20 = радостный
story-gen-book-character-trait21 = страшно красивый
story-gen-book-character-trait22 = роботизированный
story-gen-book-character-trait23 = голографический
story-gen-book-character-trait24 = истерически смеющийся
story-gen-book-character29 = космическом драконе
story-gen-book-character30 = революционере
story-gen-book-character31 = ядерном оперативнике
story-gen-book-character32 = культисте Нар'си
story-gen-book-character33 = культисте Ратвара
story-gen-book-character34 = грейтайдере
story-gen-book-character35 = арахниде
story-gen-book-character36 = воксе
story-gen-book-character37 = дворфе
story-gen-book-character38 = воре
story-gen-book-character39 = волшебнике
story-gen-book-character40 = слайме
story-gen-book-character-trait1 = глупом
story-gen-book-character-trait2 = умном
story-gen-book-character-trait3 = смешном
story-gen-book-character-trait4 = привлекательном
story-gen-book-character-trait5 = очаровательном
story-gen-book-character-trait6 = противном
story-gen-book-character-trait7 = умирающем
story-gen-book-character-trait8 = старом
story-gen-book-character-trait9 = молодом
story-gen-book-character-trait10 = богатом
story-gen-book-character-trait11 = бедном
story-gen-book-character-trait12 = популярном
story-gen-book-character-trait13 = рассеянном
story-gen-book-character-trait14 = суровом
story-gen-book-character-trait15 = харизматичном
story-gen-book-character-trait16 = стоическом
story-gen-book-character-trait17 = милом
story-gen-book-character-trait18 = дворфийском
story-gen-book-character-trait19 = пахнущем пивом
story-gen-book-character-trait20 = радостном
story-gen-book-character-trait21 = страшно красивом
story-gen-book-character-trait22 = роботизированном
story-gen-book-character-trait23 = голографическом
story-gen-book-character-trait24 = истерически смеющемся
story-gen-book-event1 = нашествия зомби
story-gen-book-event2 = ядерного взрыва
story-gen-book-event3 = массового убийства
Expand Down
Loading

0 comments on commit bceb45d

Please sign in to comment.