From 69bf214a478892f5759e362f4d61027af5f8866e Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 30 Oct 2015 12:22:19 +0000 Subject: * full localization, with culture temporarily falling back to en-US git-svn-id: https://svn.emkael.info/an9k@65 05ec0d5d-773b-4d93-9e23-c81a7ac79feb --- Analizator9000/Analizator9000/Accumulator.cs | 18 +- .../Analizator9000/Analizator9000.csproj | 23 +- Analizator9000/Analizator9000/BCalcWrapper.cs | 6 +- Analizator9000/Analizator9000/DealerParser.cs | 8 +- Analizator9000/Analizator9000/DealerWrapper.cs | 4 +- Analizator9000/Analizator9000/Form1.cs | 43 +- Analizator9000/Analizator9000/Form1.en.resx | 81 - Analizator9000/Analizator9000/Form1.resx | 4012 +++++++++++++------- .../Analizator9000/Properties/AssemblyInfo.cs | 2 +- Analizator9000/Analizator9000/ScoreAccumulator.cs | 16 +- Analizator9000/Analizator9000/Strings.Designer.cs | 351 ++ Analizator9000/Analizator9000/Strings.en.resx | 216 ++ Analizator9000/Analizator9000/Strings.pl.resx | 101 + Analizator9000/Analizator9000/Strings.resx | 216 ++ 14 files changed, 3576 insertions(+), 1521 deletions(-) create mode 100644 Analizator9000/Analizator9000/Strings.Designer.cs create mode 100644 Analizator9000/Analizator9000/Strings.en.resx create mode 100644 Analizator9000/Analizator9000/Strings.pl.resx create mode 100644 Analizator9000/Analizator9000/Strings.resx diff --git a/Analizator9000/Analizator9000/Accumulator.cs b/Analizator9000/Analizator9000/Accumulator.cs index 00e7d23..6fd9163 100644 --- a/Analizator9000/Analizator9000/Accumulator.cs +++ b/Analizator9000/Analizator9000/Accumulator.cs @@ -53,7 +53,7 @@ namespace Analizator9000 this.deals = new Stack(deals); if (this.deals.Count == 0) { - throw new Exception("Podano pusty zbiór rozdań"); + throw new Exception(Form1.GetResourceManager().GetString("Accumulator_errorNoDeals", Form1.GetCulture())); } this.toAnalyze = deals.LongLength; this.form = form; @@ -140,7 +140,7 @@ namespace Analizator9000 } catch (Exception ex) { - this.form.addStatusLine("Błąd: " + ex.Message); + this.form.addStatusLine(Form1.GetResourceManager().GetString("Form1_error", Form1.GetCulture()) + ": " + ex.Message); } foreach (int entry in row.Value) { @@ -149,7 +149,9 @@ namespace Analizator9000 BCalcResult result = solver.run(entry); if (!this.abort) { - String line = "#" + result.dealNo + ", " + result.declarer + " gra w " + result.trumpSuit + ", lew: " + result.tricks; + String line = "#" + result.dealNo + ", " + result.declarer + " " + + Form1.GetResourceManager().GetString("Accumulator_playsIn", Form1.GetCulture()) + " " + result.trumpSuit + ", " + + Form1.GetResourceManager().GetString("Accumulator_tricks", Form1.GetCulture()) + ": " + result.tricks; this.form.addStatusLine(line); this.outputFile.WriteLine(line); this.update(result); @@ -158,7 +160,7 @@ namespace Analizator9000 } catch (Exception ex) { - this.form.addStatusLine("Błąd: " + ex.Message); + this.form.addStatusLine(Form1.GetResourceManager().GetString("Form1_error", Form1.GetCulture()) + ": " + ex.Message); } } } @@ -167,7 +169,7 @@ namespace Analizator9000 catch (Exception ex) { this.outputFile.WriteLine(ex.Message); - this.form.addStatusLine("Błąd: " + ex.Message); + this.form.addStatusLine(Form1.GetResourceManager().GetString("Form1_error", Form1.GetCulture()) + ": " + ex.Message); } } @@ -197,7 +199,8 @@ namespace Analizator9000 if (this.abort) { this.form.setProgress(0); - this.form.addStatusLine("Analiza przewana. Częściowe wyniki w pliku: " + this.filename); + this.form.addStatusLine(Form1.GetResourceManager().GetString("Accumulator_analysisInterrupted", Form1.GetCulture()) + + ": " + this.filename); finished = true; } else @@ -209,7 +212,8 @@ namespace Analizator9000 if (threadsRunning == 0 && this.deals.Count == 0) { this.form.setProgress(100); - this.form.addStatusLine("Analiza zakończona. Wyniki w pliku: " + this.filename); + this.form.addStatusLine(Form1.GetResourceManager().GetString("Accumulator_analysisFinished", Form1.GetCulture()) + + ": " + this.filename); finished = true; } if (threadsRunning < this.portionSize) diff --git a/Analizator9000/Analizator9000/Analizator9000.csproj b/Analizator9000/Analizator9000/Analizator9000.csproj index 30f6329..f5e3a6f 100644 --- a/Analizator9000/Analizator9000/Analizator9000.csproj +++ b/Analizator9000/Analizator9000/Analizator9000.csproj @@ -91,6 +91,11 @@ + + True + True + Strings.resx + @@ -101,6 +106,7 @@ Form1.cs + Designer ResXFileCodeGenerator @@ -112,6 +118,13 @@ Resources.resx True + + + + ResXFileCodeGenerator + Strings.Designer.cs + Designer + Designer Always @@ -154,15 +167,11 @@ true - - - + - robocopy $(TargetDir) $(TargetDir)\lang "$(TargetName).resources.dll" /CREATE /S /XD lang /IS /IT -robocopy $(TargetDir) $(TargetDir)\lang "$(TargetName).resources.dll" /MOVE /S /XD lang /XL /IS /IT -set rce=%25errorlevel%25 -if %25rce%25 GEQ 8 exit %25rce%25 else exit 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Unable to load deal + + + Incorrect declarer + + + Incorrect denomination + + + 'generate' value too large + + + 'produce' value too large + + + Too many 'generate' values in script + + + Too many 'produce' values in script + + + File not found + + + Incorrect number of deals to generate + + + Analysis error + + + No contracts provided + + + No deals found in file + + + Opening file + + + Error + + + File open error + + + Unable to write file. Please check if 'files' directory exists + + + File written + + + Generator error + + + Input error + + + IMP + + + MP + + + CONTRACT TRICKS SCORE MADE? MP IMP + + + both vul. + + + EW vul. + + + Vulnerability + + + none vul. + + + NS vul. + + + Analysis completed. Results in file + + + Analysis interrupted. Partial results in file + + + Deal set is empty + + + plays in + + + tricks + + \ No newline at end of file diff --git a/Analizator9000/Analizator9000/Strings.pl.resx b/Analizator9000/Analizator9000/Strings.pl.resx new file mode 100644 index 0000000..85c9090 --- /dev/null +++ b/Analizator9000/Analizator9000/Strings.pl.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Analizator9000/Analizator9000/Strings.resx b/Analizator9000/Analizator9000/Strings.resx new file mode 100644 index 0000000..5bfb046 --- /dev/null +++ b/Analizator9000/Analizator9000/Strings.resx @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Nie można wczytać rozdania + + + Nieprawidłowy rozgrywający + + + Nieprawidłowe miano + + + Za duża wartość 'generate' + + + Za duża wartość 'produce' + + + Zbyt duża liczba wartości 'generate' w skrypcie + + + Zbyt duża liczba linii 'produce' w skrypcie + + + Nie znaleziono pliku + + + Nieprawidłowa liczba rozdań do wyprodukowania + + + Błąd analizy + + + Nie podano kontraktów + + + Plik nie zawiera żadnych rozdań + + + Otwieram plik + + + Błąd + + + Błąd wczytywania pliku + + + Nie można utworzyć pliku. Sprawdź, czy w katalogu programu istnieje katalog 'files' + + + Zapisano do pliku + + + Błąd generatora + + + Błąd wprowadzania danych + + + IMP + + + max + + + KONTRAKT LEWY ZAPIS WYGRA? MAX IMP + + + obie po + + + EW po + + + Założenia + + + obie przed + + + NS po + + + Analiza zakończona. Wyniki w pliku + + + Analiza przewana. Częściowe wyniki w pliku + + + Podano pusty zbiór rozdań + + + gra w + + + lew + + \ No newline at end of file -- cgit v1.2.3