Skip to content

Commit ce0dc80

Browse files
authored
fix(android): use i18n app name in AndroidManifest (#14400)
1 parent de4eb55 commit ce0dc80

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

android/cli/commands/_build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class AndroidBuilder extends Builder {
7373
};
7474

7575
this.targets = [ 'emulator', 'device', 'dist-playstore' ];
76+
this.appName = null;
7677
}
7778

7879
config(logger, config, cli) {
@@ -1666,6 +1667,7 @@ class AndroidBuilder extends Builder {
16661667

16671668
this.appid = this.tiapp.id;
16681669
this.appid.indexOf('.') === -1 && (this.appid = 'com.' + this.appid);
1670+
this.appName = this.tiapp.name;
16691671

16701672
this.classname = this.tiapp.name.split(/[^A-Za-z0-9_]/).map(function (word) {
16711673
return appc.string.capitalize(word.toLowerCase());
@@ -3230,6 +3232,7 @@ class AndroidBuilder extends Builder {
32303232
}
32313233
localeData.strings.app_name = appName;
32323234
}
3235+
this.appName = appName;
32333236

32343237
// Create the XML content for all localized strings.
32353238
const dom = new DOMParser().parseFromString('<resources/>', 'text/xml');
@@ -3693,7 +3696,7 @@ class AndroidBuilder extends Builder {
36933696
mainManifestContent = ejs.render(mainManifestContent.toString(), {
36943697
appChildXmlLines: appChildXmlLines,
36953698
appIcon: this.appIconManifestValue,
3696-
appLabel: this.tiapp.name,
3699+
appLabel: this.appName,
36973700
classname: this.classname,
36983701
storagePermissionMaxSdkVersion: neededManifestSettings.storagePermissionMaxSdkVersion,
36993702
packageName: this.appid,

0 commit comments

Comments
 (0)