-
Couldn't load subscription status.
- Fork 534
Added Russian, German and Spanish languages for ListItemTextGetter_* classes #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: vNext
Are you sure you want to change the base?
Conversation
| { | ||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace nuen with neun everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I fixed that.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace thausend with tausend everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I fixed that.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ,).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.