Skip to content

Commit 5147551

Browse files
committed
Fixed translator
1 parent f25c44b commit 5147551

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Modules/Translator.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ private string Translate(string key, params object[] arguments)
2525
{
2626
var centerModifier = "center.";
2727
var isCenter = key.StartsWith(centerModifier);
28-
key = key.Substring(centerModifier.Length);
29-
28+
if (isCenter)
29+
{
30+
key = key.Substring(centerModifier.Length);
31+
}
32+
3033
var localizedString = _stringLocalizerImplementation[key, arguments];
3134

3235
if (localizedString == null || localizedString.ResourceNotFound)

0 commit comments

Comments
 (0)