Skip to content

Commit

Permalink
VPN-6616 and VPN-6617: Addon messages for 2.25 (#10066)
Browse files Browse the repository at this point in the history
* VPN-6616 and VPN-6617 update messages

* add update message
  • Loading branch information
mcleinman authored Dec 2, 2024
1 parent 1352f9e commit a3005a2
Show file tree
Hide file tree
Showing 11 changed files with 145 additions and 57 deletions.
53 changes: 0 additions & 53 deletions addons/message_update_v2.24/manifest.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
})
File renamed without changes.
69 changes: 69 additions & 0 deletions addons/message_update_v2.25/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions addons/message_whats_new_v2.25/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
3 changes: 3 additions & 0 deletions addons/message_whats_new_v2.25/setDate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(function(api) {
api.addon.date = (api.settings.updateTime.getTime() / 1000);
})
20 changes: 20 additions & 0 deletions addons/strings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions scripts/addon/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3005a2

Please sign in to comment.