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
| private async Task LoginAsync(string lng) | |
| { | |
| // skip onboarding | |
| Keyboard.SendKeys("{Escape}"); | |
| // set locale | |
| this.UIMap.UISettleUpWindow.LocaleTextBox.Text = lng; | |
| // email login | |
| var email = $"screenshots-{lng}@settleup.io"; |
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
| [TestMethod] public async Task LoginAndTakeScreenshotsFiAsync() => await this.LoginAndTakeScreenshotsAsync("cs-CZ"); | |
| [TestMethod] public async Task LoginAndTakeScreenshotsDeAsync() => await this.LoginAndTakeScreenshotsAsync("de"); | |
| //... other languages | |
| public async Task LoginAndTakeScreenshotsAsync(string lng) | |
| { | |
| var window = XamlWindow.Launch("app-automation-id"); | |
| // 1) main screen | |
| await this.LoginAsync(lng, email); |
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
| <!-- Android strings.xml: --> | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <string name="settle_debts">Vyrovnat dluhy</string> | |
| <string name="report">Nahlásit</string> | |
| </resources> | |
| <!-- UWP ResX: --> | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <root> |
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
| function Convert-StringsToResX([string] $strings) | |
| { | |
| [xml]$xml = Get-Content -Path $strings -Encoding UTF8 | |
| Write-ResXHeader | |
| # android strings | |
| $nodes = $xml.SelectNodes("/resources/string") | |
| foreach ($node in $nodes) | |
| { |
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
| function Convert-Everything([string] $rootDir, [string[]]$languages) | |
| { | |
| $resources = "$rootDir" | |
| $neutralStrings = "$resources/strings.xml" | |
| # generate appresources.designer.cs file | |
| Write-DesignerFile $neutralStrings $neutralResx | Out-File -FilePath 'AppResources.Designer.cs' | |
| # generate neutral appresources.resx | |
| Convert-StringsToResX $neutralStrings $neutralResx | Out-File -FilePath 'AppResources.resx' -encoding utf8 |
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
| public string OrangesOne => ResourceManager.GetString("oranges_one", this.resourceCulture); | |
| public string OrangesFew => ResourceManager.GetString("oranges_few", this.resourceCulture); | |
| public string OrangesOther => ResourceManager.GetString("oranges_other", this.resourceCulture); | |
| public string OrangesWithCount(int count) { | |
| var key = ""; | |
| switch (count) | |
| { | |
| case 1: | |
| // one orange |
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
| val count = getNumberOfOrangesAvailable() | |
| val orangesFound = resources.getQuantityString(R.plurals.numberOfOrangesAvailable, count, count) |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <plurals name="numberOfOrangesAvailable"> | |
| <item quantity="one">%d pomeranč.</item> | |
| <item quantity="few">%d pomeranče.</item> | |
| <item quantity="other">%d pomerančů.</item> | |
| </plurals> | |
| </resources> |