Added Russian, German and Spanish languages for ListItemTextGetter_* classes#44
Open
alexeysp11 wants to merge 20 commits intoOpenXmlDev:vNextfrom
Open
Added Russian, German and Spanish languages for ListItemTextGetter_* classes#44alexeysp11 wants to merge 20 commits intoOpenXmlDev:vNextfrom
alexeysp11 wants to merge 20 commits intoOpenXmlDev:vNextfrom
Conversation
tolot27
reviewed
Sep 11, 2024
| { | ||
| private static string[] OneThroughNineteen = { | ||
| "eins", "zwei", "drei", "vier", "fünf", "sechs", "sieben", "acht", | ||
| "nuen", "zehn", "elf", "zwölf", "dreizehn", "vierzehn", |
There was a problem hiding this comment.
please replace nuen with neun everywhere.
tolot27
reviewed
Sep 11, 2024
| int t1 = levelNumber / 1000; | ||
| int t2 = levelNumber % 1000; | ||
| if (t1 >= 1) | ||
| result += (t1 == 1 ? "ein" : OneThroughNineteen[t1 - 1]) + " thausend"; |
There was a problem hiding this comment.
Please replace thausend with tausend everywhere.
tolot27
reviewed
Sep 12, 2024
| public static string GetListItemText(string languageCultureName, int levelNumber, string numFmt) | ||
| { | ||
| if (levelNumber > 19999) | ||
| throw new ArgumentOutOfRangeException("levelNumber", "Convering a levelNumber to ordinal text that is greater then 19 999 is not supported"); |
There was a problem hiding this comment.
Replace Convering with Converting in all of the language-related files of the commit. I recommend to write "19 999" as "19999" because the thausand separator is different in different languages (in English it is a ,).
Author
There was a problem hiding this comment.
Ok, done. I also found and fixed a few more typos in the code. Additionally, I added tests for German and Spanish.
newlanguagestests: typo fixing and class testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Added Russian, German and Spanish languages for
ListItemTextGetter_classesGetListItemText_ru_RUtoListItemTextGetter_ru_RUto maintain consistency in class naming.ListItemTextGetter_de_DEto support German.ListItemTextGetter_es_ESto support Spanish.greater then->greater than, 2)Convering->Converting, etc.Testing
ListItemTextGetter_ru_RUTests.ListItemTextGetter_de_DETests.ListItemTextGetter_es_ESTests.TargetFrameworksparameter inOpenXmlPowerTools.Tests.csproj: fromnetcoreapp2.0tonetcoreapp3.1. Reason:OpenXmlPowerTools.Tests.csprojrefers only toOpenXmlPowerTools.csproj, and inOpenXmlPowerTools.csprojTargetFrameworksparameter is defined asnet45;net46;netstandard2.0;netcoreapp3.1, so it could be better to usenetcoreapp3.1instead ofnetcoreapp2.0inOpenXmlPowerTools.Tests.csproj.