Skip to content

Commit

Permalink
Merge pull request #4589 from hieupham007/timob-12161
Browse files Browse the repository at this point in the history
timob-12161: Localization of string names with '.'
  • Loading branch information
pingwang2011 committed Aug 26, 2013
2 parents bcebf96 + 867accb commit 90d473b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ public void setLanguage(String language)
Log.w(TAG, "Locale.setLanguage not supported for Android.");
}

@Kroll.method
@Kroll.method @Kroll.topLevel("L")
public String getString(String key, @Kroll.argument(optional=true) String defaultValue)
{
try {
int resid = TiRHelper.getResource("string." + key);
int resid = TiRHelper.getResource("string." + key.replace(".","_"));
if (resid != 0) {
return TiApplication.getInstance().getString(resid);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public String stringFormatDecimal(Object args[])
return format.format((Number)args[0]);
}

@Kroll.method @Kroll.topLevel("L")
@Kroll.method
public String localize(Object args[])
{
String key = (String) args[0];
Expand Down

0 comments on commit 90d473b

Please sign in to comment.