diff --git a/addons/message_update_v2.24/manifest.json b/addons/message_update_v2.24/manifest.json deleted file mode 100644 index c82f6310b8..0000000000 --- a/addons/message_update_v2.24/manifest.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "api_version": "0.1", - "id": "message_update_v2.24", - "name": "Update to Mozilla VPN 2.24", - "type": "message", - "conditions": { - "max_client_version": "2.23.9", - "javascript": "osCheck.js" - }, - "javascript": { - "enable": "enable.js" - }, - "message": { - "date": 1722476590, - "id": "message_update_v2.24", - "title": "Update to Mozilla VPN 2.24", - "subtitle": "We’ve released an updated version of Mozilla VPN! Update to the latest version for the best possible Mozilla VPN experience.", - "badge": "new_update", - "blocks": [ - { - "id": "c_1-2", - "type": "text", - "content": "This update includes minor bug fixes, UI adjustments and other performance improvements." - }, - { - "id": "c_3", - "type": "button", - "style": "primary", - "content": "Update now", - "javascript": "update.js" - }, - { - "id": "c_4", - "type": "button", - "style": "primary", - "content": "Download update", - "javascript": "updateWeb.js" - }, - { - "id": "c_5", - "type": "button", - "style": "link", - "content": "Get help", - "javascript": "getHelp.js" - }, - { - "id": "extra_1", - "type": "text", - "content": "Download the new Mozilla VPN 2.24" - } - ] - } -} diff --git a/addons/message_update_v2.24/enable.js b/addons/message_update_v2.25/enable.js similarity index 92% rename from addons/message_update_v2.24/enable.js rename to addons/message_update_v2.25/enable.js index 0a2328b488..9b014df684 100644 --- a/addons/message_update_v2.24/enable.js +++ b/addons/message_update_v2.25/enable.js @@ -10,7 +10,7 @@ if (('updateTime' in api.settings)) { // Macos v2.16.0 requires a web-based update. if (api.env.platform === 'macos' && api.env.versionString === '2.16.0') { api.addon.setTitle( - 'message.message_update_v2.24.block.extra_1', + 'message.message_update_v2.25.block.extra_1', 'Download the new Mozilla VPN'); api.addon.composer.remove('c_3'); return; @@ -51,6 +51,6 @@ if (versionCompare([2, 13, 0], version) >= 0 || api.addon.composer.remove('c_3'); api.addon.setTitle( - 'message.message_update_v2.24.block.extra_1', + 'message.message_update_v2.25.block.extra_1', 'Download the new Mozilla VPN'); }) diff --git a/addons/message_update_v2.24/getHelp.js b/addons/message_update_v2.25/getHelp.js similarity index 100% rename from addons/message_update_v2.24/getHelp.js rename to addons/message_update_v2.25/getHelp.js diff --git a/addons/message_update_v2.25/manifest.json b/addons/message_update_v2.25/manifest.json new file mode 100644 index 0000000000..b80c305ade --- /dev/null +++ b/addons/message_update_v2.25/manifest.json @@ -0,0 +1,69 @@ +{ + "api_version": "0.1", + "id": "message_update_v2.25", + "name": "Update to Mozilla VPN 2.25", + "type": "message", + "conditions": { + "max_client_version": "2.24.9", + "javascript": "osCheck.js" + }, + "javascript": { + "enable": "enable.js" + }, + "message": { + "date": 1733763600, + "usesSharedStrings": true, + "shortVersion": "2.25", + "id": "message_update_v2.25", + "title": "vpn.commonStrings.updateTitle", + "subtitle": "vpn.commonStrings.subtitle", + "badge": "new_update", + "blocks": [ + { + "id": "c_1", + "type": "text", + "content": "vpn.commonStrings.generalUpdateBulletIntro" + }, + { + "id": "c_2", + "type": "ulist", + "content": [ + { + "id": "l_1", + "content": "vpn.225updateMessage.bullet1" + }, + { + "id": "l_2", + "content": "vpn.225updateMessage.bullet2" + } + ] + }, + { + "id": "c_3", + "type": "button", + "style": "primary", + "content": "vpn.commonStrings.updateButton", + "javascript": "update.js" + }, + { + "id": "c_4", + "type": "button", + "style": "primary", + "content": "vpn.commonStrings.downloadButton", + "javascript": "updateWeb.js" + }, + { + "id": "c_5", + "type": "button", + "style": "link", + "content": "vpn.commonStrings.getHelpButton", + "javascript": "getHelp.js" + }, + { + "id": "extra_1", + "type": "text", + "content": "vpn.commonStrings.downloadTitle" + } + ] + } +} diff --git a/addons/message_update_v2.24/osCheck.js b/addons/message_update_v2.25/osCheck.js similarity index 100% rename from addons/message_update_v2.24/osCheck.js rename to addons/message_update_v2.25/osCheck.js diff --git a/addons/message_update_v2.24/update.js b/addons/message_update_v2.25/update.js similarity index 100% rename from addons/message_update_v2.24/update.js rename to addons/message_update_v2.25/update.js diff --git a/addons/message_update_v2.24/updateWeb.js b/addons/message_update_v2.25/updateWeb.js similarity index 100% rename from addons/message_update_v2.24/updateWeb.js rename to addons/message_update_v2.25/updateWeb.js diff --git a/addons/message_whats_new_v2.25/manifest.json b/addons/message_whats_new_v2.25/manifest.json new file mode 100644 index 0000000000..234fb0600d --- /dev/null +++ b/addons/message_whats_new_v2.25/manifest.json @@ -0,0 +1,49 @@ +{ + "api_version": "0.1", + "id": "message_whats_new_v2.25", + "name": "What's new message", + "type": "message", + "conditions": { + "min_client_version": "2.25.0", + "max_client_version": "2.25.9" +}, + "javascript": { + "enable": "setDate.js" + }, + "message": { + "date": 1733763600, + "usesSharedStrings": true, + "shortVersion": "2.25", + "id": "message_whats_new_v2.25", + "title": "vpn.commonStrings.whatsNewTitle", + "subtitle": "vpn.commonStrings.latestVersionSubtitle", + "badge": "whats_new", + "notify": false, + "blocks": [ + { + "id": "c_1", + "type": "text", + "content": "vpn.commonStrings.generalUpdateBulletIntro" + }, + { + "id": "c_2", + "type": "ulist", + "content": [ + { + "id": "l_1", + "content": "vpn.225updateMessage.bullet1" + }, + { + "id": "l_2", + "content": "vpn.225updateMessage.bullet2" + } + ] + }, + { + "id": "c_3", + "type": "text", + "content": "vpn.commonStrings.whatsNewClosing" + } + ] + } +} diff --git a/addons/message_whats_new_v2.25/setDate.js b/addons/message_whats_new_v2.25/setDate.js new file mode 100644 index 0000000000..61416f2412 --- /dev/null +++ b/addons/message_whats_new_v2.25/setDate.js @@ -0,0 +1,3 @@ +(function(api) { +api.addon.date = (api.settings.updateTime.getTime() / 1000); +}) diff --git a/addons/strings.yaml b/addons/strings.yaml index b21dde8f41..ca413a2ef9 100644 --- a/addons/strings.yaml +++ b/addons/strings.yaml @@ -51,6 +51,9 @@ commonStrings: generalUpdateContent: value: This update includes minor bug fixes, UI adjustments and other performance improvements. comment: Default update notes + generalUpdateBulletIntro: + value: "This update includes minor bug fixes, UI adjustments and other performance improvements, including:" + comment: Default update text before several bullet points with specific updates updateButton: value: Update now comment: Button label @@ -60,6 +63,23 @@ commonStrings: getHelpButton: value: Get help comment: Button label + whatsNewTitle: + value: You’ve updated to Mozilla VPN %1 + comment: Title for What's New message. %1 is replaced by the version number, such as 2.25 + latestVersionSubtitle: + value: You’re using the latest version of Mozilla VPN. + comment: Subtitle for default What's New message + whatsNewClosing: + value: Thank you for installing the latest version! + comment: Closing for default What's New message + +225updateMessage: + bullet1: + value: On iOS, enhanced stability and reliability for VPN connections. + comment: First bullet point with a specific update in 2.25 + bullet2: + value: On Android, added step-by-step instructions to enable VPN connection on startup. + comment: Second bullet point with a specific update in 2.25 tryFirefoxExtension: title: diff --git a/scripts/addon/build.py b/scripts/addon/build.py index 38d01340bf..6bae503dcc 100755 --- a/scripts/addon/build.py +++ b/scripts/addon/build.py @@ -324,11 +324,11 @@ def transform_shared_strings(input_file, output_file, relevant_strings, short_ve trans_unit.set('id', string_details['legacy_id']) # Then, swap in the short version number if needed. - # All languages have source, but only non-English langauges have target. + # All languages have source, but only non-English languages have target. source = trans_unit.find('.//xliff:source', ns) source.text = source.text.replace('%1', short_version) target = trans_unit.find('.//xliff:target', ns) - if type(target) is ET.Element: + if type(target) is ET.Element and target.text: target.text = target.text.replace('%1', short_version) # Write the filtered tree to the output file, creating the folders if needed