Skip to content

Commit

Permalink
do not break my not localized fax!
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 committed Jul 24, 2024
1 parent d7836fd commit 5877708
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
22 changes: 19 additions & 3 deletions Content.Client/Fax/UI/FaxWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ public void UpdateState(FaxUiState state)
{
CopyButton.Disabled = !state.CanCopy;
SendButton.Disabled = !state.CanSend;
FromLabel.Text = Loc.GetString($"fax-label-{Regex.Replace(state.DeviceName, @"[*?!'%\s]", string.Empty).ToLower()}");

var Localekey = $"fax-label-{Regex.Replace(state.DeviceName, @"[*?!'%\s]", string.Empty).ToLower()}"

Check failure on line 43 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 43 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

; expected

Check failure on line 43 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 43 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

; expected
if Loc.GetString($"fax-label-{Regex.Replace(state.DeviceName, @"[*?!'%\s]", string.Empty).ToLower()}") == Localekey

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Syntax error, '(' expected

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

) expected

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Syntax error, '(' expected

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

) expected

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Syntax error, '(' expected

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

) expected

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Syntax error, '(' expected

Check failure on line 44 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

) expected
{
FromLabel.Text = state.DeviceName;
}
else
{
FromLabel.Text = Loc.GetString($"fax-label-{Regex.Replace(state.DeviceName, @"[*?!'%\s]", string.Empty).ToLower()}");
}

if (state.IsPaperInserted)
{
PaperStatusLabel.FontColorOverride = Color.Green;
Expand Down Expand Up @@ -87,7 +95,15 @@ public void UpdateState(FaxUiState state)

private int AddPeerSelect(string name, string address)
{
var loc = Loc.GetString($"fax-label-{Regex.Replace(name, @"[*?!'%\s]", string.Empty).ToLower()}");
var Localekey = $"fax-label-{Regex.Replace(name, @"[*?!'%\s]", string.Empty).ToLower()}"

Check failure on line 98 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 98 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

; expected

Check failure on line 98 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 98 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

; expected
if Loc.GetString($"fax-label-{Regex.Replace(name, @"[*?!'%\s]", string.Empty).ToLower()}"); == Localekey

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Syntax error, '(' expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

) expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Invalid expression term '=='

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Syntax error, '(' expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

) expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Invalid expression term '=='

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

; expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Syntax error, '(' expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

) expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Invalid expression term '=='

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Syntax error, '(' expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

) expected

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Invalid expression term '=='

Check failure on line 99 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

; expected
{
var loc = name

Check failure on line 101 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 101 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

; expected

Check failure on line 101 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

; expected

Check failure on line 101 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

; expected
}

Check failure on line 102 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'else' cannot start a statement.

Check failure on line 102 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

'else' cannot start a statement.

Check failure on line 102 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'else' cannot start a statement.

Check failure on line 102 in Content.Client/Fax/UI/FaxWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

'else' cannot start a statement.
else
{
var loc = Loc.GetString($"fax-label-{Regex.Replace(name, @"[*?!'%\s]", string.Empty).ToLower()}");
}
PeerSelector.AddItem(loc);
PeerSelector.SetItemMetadata(PeerSelector.ItemCount - 1, address);
return PeerSelector.ItemCount - 1;
Expand Down
16 changes: 15 additions & 1 deletion Resources/Locale/ru-RU/fax/fax.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,30 @@ fax-machine-chat-notify = Получено новое сообщение с "{ $
fax-machine-printed-paper-name = распечатанная бумага
fax-lable-err = ОШИБКА*?*%!
fax-label-captainoffice = Кабинет капитана
fax-label-captainsoffice = Кабинет капитана
fax-label-centralcommand = Центральное коммандование
fax-label-hop = Глава персонала
fax-label-lawoffice = Юридический офис
fax-label-lawyeroffice = Юридический офис
fax-label-lawyersoffice = Юридический офис
fax-label-bridge = Мостик
fax-label-science = Научный отдел
fax-label-detectiveoffice = Офис детектива
fax-label-detectivesoffice = Офис детектива
fax-label-cargo = Карго
fax-label-security = Служба безопасности
fax-label-library = Библиотека
fax-label-psych = Психолог
fax-label-Chaplain = Священник
fax-label-cmooffice = Офис ГВ
fax-label-cmooffice = Офис ГВ
fax-label-cmosoffice = Офис ГВ
fax-label-wardenoffice = Офис Смотрителя
fax-label-wardensoffice = Офис Смотрителя
fax-label-quartermaster = Квартирмейстер
fax-label-blueshieldoffice = Офис ОСЩ
fax-label-blueshieldsoffice = Офис ОСЩ
fax-label-service = Сервис
fax-label-unknown = Неизвестный
fax-label-bridgeconference = Зал конференций
fax-label-spareoffice = Запасной офис

0 comments on commit 5877708

Please sign in to comment.