forked from ppy/osu-localisation-analyser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ppy#13 from smoogipoo/fix-interpolation-test
Fix interpolated string tests
- Loading branch information
Showing
6 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
19 changes: 19 additions & 0 deletions
19
...ts/Resources/CodeFixes/InterpolatedStringWithQuotes/Fixed/Localisation/ProgramStrings.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Localisation; | ||
|
||
namespace TestProject.Localisation | ||
{ | ||
public static class ProgramStrings | ||
{ | ||
private const string prefix = @"TestProject.Localisation.Program"; | ||
|
||
/// <summary> | ||
/// "Folder "{0}" not available in the target osu!stable installation to import." | ||
/// </summary> | ||
public static LocalisableString Foldernota(string fullPath) => new TranslatableString(getKey(@"foldernota"), @"Folder ""{0}"" not available in the target osu!stable installation to import.", fullPath); | ||
|
||
private static string getKey(string key) => $@"{prefix}:{key}"; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...lisationAnalyser.Tests/Resources/CodeFixes/InterpolatedStringWithQuotes/Fixed/Program.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using TestProject.Localisation; | ||
|
||
namespace Test | ||
{ | ||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
string fullPath = string.Empty; | ||
string x = ProgramStrings.Foldernota(fullPath); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...sationAnalyser.Tests/Resources/CodeFixes/InterpolatedStringWithQuotes/Sources/Program.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace Test | ||
{ | ||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
string fullPath = string.Empty; | ||
string x = [|$"Folder \"{fullPath}\" not available in the target osu!stable installation to import."|]; | ||
} | ||
} | ||
} |