Skip to content
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

timob-12161: Localization of string names with '.' #4589

Merged
merged 1 commit into from
Aug 26, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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