Remove deleted strings after one month
This commit is contained in:
parent
556dbe3114
commit
e0bac61346
3 changed files with 72 additions and 174 deletions
|
@ -451,10 +451,6 @@
|
|||
"message": "The safety number you are trying to verify has changed. Please review your new safety number with $name1$. Remember, this change could mean that someone is trying to intercept your communication or that $name2$ has simply reinstalled Signal.",
|
||||
"description": "Shown on the safety number screen when the user has selected to verify/unverify a contact's safety number, and we immediately discover a safety number change"
|
||||
},
|
||||
"changedVerificationWarning": {
|
||||
"message": "The following people may have reinstalled or changed devices. Verify your safety number with them to ensure privacy.",
|
||||
"description": "(deleted 2022/11/26) Shown on confirmation dialog when user attempts to send a message"
|
||||
},
|
||||
"safetyNumberChangeDialog__message": {
|
||||
"message": "The following people may have reinstalled Signal or changed devices. Click a recipient to confirm their new safety number. This is optional.",
|
||||
"description": "Shown on confirmation dialog when user attempts to send a message"
|
||||
|
@ -578,14 +574,6 @@
|
|||
"message": "Accept",
|
||||
"description": "Label for a button to accept a new safety number"
|
||||
},
|
||||
"verify": {
|
||||
"message": "Mark as verified",
|
||||
"description": "(deleted 2023/02/03)"
|
||||
},
|
||||
"unverify": {
|
||||
"message": "Mark as not verified",
|
||||
"description": "(deleted 2023/02/03)"
|
||||
},
|
||||
"icu:SafetyNumberViewer__markAsVerified": {
|
||||
"messageformat": "Mark as verified",
|
||||
"description": "Safety number viewer, verification toggle button, when not verified, sets verified"
|
||||
|
@ -711,10 +699,6 @@
|
|||
"message": "You cannot add any more attachments to this message.",
|
||||
"description": "An error popup when the user has attempted to add an attachment"
|
||||
},
|
||||
"fileSizeWarning": {
|
||||
"message": "Sorry, the selected file exceeds message size restrictions.",
|
||||
"description": "(deleted 2022/12/07) Shown in a toast if the user tries to attach too-large file"
|
||||
},
|
||||
"icu:fileSizeWarning": {
|
||||
"messageformat": "Sorry, the selected file exceeds message size restrictions. {limit}{units}",
|
||||
"description": "Shown in a toast if the user tries to attach too-large file"
|
||||
|
@ -1142,10 +1126,6 @@
|
|||
"messageformat": "You to {receiverContact}",
|
||||
"description": "Shown for search result items - like 'You to Jon'"
|
||||
},
|
||||
"toJoiner": {
|
||||
"message": "to",
|
||||
"description": "(deleted 2023/02/02) Joiner for message search results - like 'Jon' to 'Friends Group'"
|
||||
},
|
||||
"sent": {
|
||||
"message": "Sent",
|
||||
"description": "Label for the time a message was sent"
|
||||
|
@ -1293,14 +1273,6 @@
|
|||
"messageformat": "Your message history for both conversations have been merged here.",
|
||||
"description": "Contents of a dialog shown after clicking 'learn more' button on a conversation merge event."
|
||||
},
|
||||
"icu:PhoneNumberDiscovery--notification--withSharedGroup": {
|
||||
"messageformat": "{phoneNumber} belongs to {conversationTitle}. You're both members of {sharedGroup}.",
|
||||
"description": "(deleted 2023/01/11) Shown when we've discovered a phone number for a contact you've been communicating with."
|
||||
},
|
||||
"icu:PhoneNumberDiscovery--notification--noSharedGroup": {
|
||||
"messageformat": "{phoneNumber} belongs to {conversationTitle}",
|
||||
"description": "(deleted 2023/01/11) Shown when we've discovered a phone number for a contact you've been communicating with, but you have no shared groups."
|
||||
},
|
||||
"quoteThumbnailAlt": {
|
||||
"message": "Thumbnail of image from quoted message",
|
||||
"description": "Used in alt tag of thumbnail images inside of an embedded message quote"
|
||||
|
@ -2002,10 +1974,6 @@
|
|||
"message": "Safety Number with $name$ has changed",
|
||||
"description": "A notification shown in a group conversation when a contact reinstalls, showing the contact name"
|
||||
},
|
||||
"verifyNewNumber": {
|
||||
"message": "Verify Safety Number",
|
||||
"description": "(deleted 2023/02/03) Label on button included with safety number change notification in the conversation"
|
||||
},
|
||||
"icu:ConversationDetails__viewSafetyNumber": {
|
||||
"messageformat": "View Safety Number",
|
||||
"description": "In conversation details, label for button to view safety number, opens safety number modal"
|
||||
|
@ -2214,10 +2182,6 @@
|
|||
"message": "Signal couldn’t update. Click to try again.",
|
||||
"description": "Shown in update dialog when partial update fails and we have to ask user to download full update"
|
||||
},
|
||||
"autoUpdateNewVersionInstructions": {
|
||||
"message": "Press Restart Signal to apply the updates.",
|
||||
"description": "(deleted 2023/01/18)"
|
||||
},
|
||||
"autoUpdateRestartButtonLabel": {
|
||||
"message": "Restart Signal"
|
||||
},
|
||||
|
@ -2335,125 +2299,61 @@
|
|||
"message": "This message was deleted.",
|
||||
"description": "Shown in a message's bubble when the message has been deleted for everyone."
|
||||
},
|
||||
"giftBadge--missing": {
|
||||
"message": "Unable to fetch gift badge details",
|
||||
"description": "(deleted 2023/01/20) Aria label for gift badge when we can't fetch the details"
|
||||
},
|
||||
"icu:donation--missing": {
|
||||
"messageformat": "Unable to fetch donation details",
|
||||
"description": "Aria label for donation when we can't fetch the details."
|
||||
},
|
||||
"message--giftBadge--unopened--incoming": {
|
||||
"message": "View this message on mobile to open it",
|
||||
"description": "(deleted 2023/01/20) Shown in a message's bubble when you've received a gift badge from a contact"
|
||||
},
|
||||
"icu:message--donation--unopened--incoming": {
|
||||
"messageformat": "View this message on mobile to open it",
|
||||
"description": "Shown in a message's bubble when you've received a donation badge from a contact"
|
||||
},
|
||||
"message--giftBadge--unopened--outgoing": {
|
||||
"message": "Tap this message on mobile to view your gift",
|
||||
"description": "(deleted 2023/01/20) Shown in a message's bubble when you've sent a gift badge to a contact"
|
||||
},
|
||||
"icu:message--donation--unopened--outgoing": {
|
||||
"messageformat": "Tap this message on mobile to view your donation",
|
||||
"description": "Shown in a message's bubble when you've sent a donation badge to a contact."
|
||||
},
|
||||
"message--giftBadge--unopened--label": {
|
||||
"message": "Gift",
|
||||
"description": "(deleted 2023/01/20) Shown in a message's bubble when you've received a gift badge from a contact"
|
||||
},
|
||||
"icu:message--donation--unopened--label": {
|
||||
"messageformat": "{sender} donated to Signal on your behalf",
|
||||
"description": "Shown in a message's bubble when you've received a donation badge from a contact."
|
||||
},
|
||||
"message--giftBadge--unopened--toast--incoming": {
|
||||
"message": "Check your phone to open gift",
|
||||
"description": "(deleted 2023/01/20) Shown when you've clicked on an incoming gift badge you haven't yet redeemed"
|
||||
},
|
||||
"icu:message--donation--unopened--toast--incoming": {
|
||||
"messageformat": "Check your phone to open this donation",
|
||||
"description": "Shown when you've clicked on an incoming donation you haven't yet redeemed."
|
||||
},
|
||||
"message--giftBadge--unopened--toast--outgoing": {
|
||||
"message": "Check your phone to view your gift",
|
||||
"description": "(deleted 2023/01/20) Shown when you've clicked on an outgoing gift badge"
|
||||
},
|
||||
"icu:message--donation--unopened--toast--outgoing": {
|
||||
"messageformat": "Check your phone to view your donation",
|
||||
"description": "Shown when you've clicked on an outgoing donation badge."
|
||||
},
|
||||
"message--giftBadge--preview--unopened": {
|
||||
"message": "You received a gift",
|
||||
"description": "(deleted 2023/01/20) Shown to label the gift badge in notifications and the left pane"
|
||||
},
|
||||
"icu:message--donation--preview--unopened": {
|
||||
"messageformat": "{sender} donated for you",
|
||||
"description": "Shown to label the donation badge in notifications and the left pane."
|
||||
},
|
||||
"message--giftBadge--preview--redeemed": {
|
||||
"message": "You redeemed a gift badge",
|
||||
"description": "(deleted 2023/01/20) Shown to label the redeemed gift badge in notifications and the left pane"
|
||||
},
|
||||
"icu:message--donation--preview--redeemed": {
|
||||
"messageformat": "You redeemed a donation",
|
||||
"description": "Shown to label the redeemed donation badge in notifications and the left pane."
|
||||
},
|
||||
"message--giftBadge--preview--sent": {
|
||||
"message": "You sent a gift badge",
|
||||
"description": "(deleted 2023/01/20) Shown to label a gift badge you've sent in notifications and the left pane"
|
||||
},
|
||||
"icu:message--donation--preview--sent": {
|
||||
"messageformat": "You donated for {recipient}",
|
||||
"description": "Shown to label a donation badge you've sent in notifications and the left pane"
|
||||
},
|
||||
"message--giftBadge": {
|
||||
"message": "Gift Badge",
|
||||
"description": "(deleted 2023/01/20) Shown to label the gift badge you've redeemed on another device"
|
||||
},
|
||||
"icu:message--donation": {
|
||||
"messageformat": "Donation",
|
||||
"description": "Shown to label the donation badge you've redeemed on another device."
|
||||
},
|
||||
"quote--giftBadge": {
|
||||
"message": "Gift",
|
||||
"description": "(deleted 2023/01/20) Shown to label a gift badge you've replied to"
|
||||
},
|
||||
"icu:quote--donation": {
|
||||
"messageformat": "Donation",
|
||||
"description": "Shown to label a donation badge you've replied to."
|
||||
},
|
||||
"message--giftBadge--remaining--days": {
|
||||
"message": "$days$ days remaining",
|
||||
"description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device (only rendered for days > 1)"
|
||||
},
|
||||
"icu:message--donation--remaining--days": {
|
||||
"messageformat": "{days} days remaining",
|
||||
"description": "Describes how long remains for the donation badge you've redeemed on another device (only rendered for days > 1)."
|
||||
},
|
||||
"message--giftBadge--remaining--hours": {
|
||||
"message": "$hours$ hours remaining",
|
||||
"description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device (only rendered for hours > 1)"
|
||||
},
|
||||
"icu:message--donation--remaining--hours": {
|
||||
"messageformat": "{hours} hours remaining",
|
||||
"description": "Describes how long remains for the donation badge you've redeemed on another device (only rendered for hours > 1)"
|
||||
},
|
||||
"message--giftBadge--remaining--minutes": {
|
||||
"message": "$minutes$ minutes remaining",
|
||||
"description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device (only rendered for minutes > 1)"
|
||||
},
|
||||
"icu:message--donation--remaining--minutes": {
|
||||
"messageformat": "{minutes, plural, one {1 minute} other {# minutes}} remaining",
|
||||
"description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device."
|
||||
},
|
||||
"message--giftBadge--remaining--one-minute": {
|
||||
"message": "1 minute remaining",
|
||||
"description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device"
|
||||
},
|
||||
"message--giftBadge--expired": {
|
||||
"message": "Expired",
|
||||
"description": "(deleted 2023/01/20) Shows that a gift badge is expired"
|
||||
"description": "Describes how long remains for the donation badge you've redeemed on another device."
|
||||
},
|
||||
"icu:message--donation--expired": {
|
||||
"messageformat": "Expired",
|
||||
|
@ -2467,26 +2367,14 @@
|
|||
"messageformat": "View",
|
||||
"description": "Shown when you've sent a donation badge to someone then opened it"
|
||||
},
|
||||
"message--giftBadge--redeemed": {
|
||||
"message": "Redeemed",
|
||||
"description": "(deleted 2023/01/20) Shown when you've redeemed the gift badge on another device"
|
||||
},
|
||||
"icu:message--donation--redeemed": {
|
||||
"messageformat": "Redeemed",
|
||||
"description": "Shown when you've redeemed the donation badge on another device"
|
||||
},
|
||||
"modal--giftBadge--title": {
|
||||
"message": "Thanks for your support!",
|
||||
"description": "(deleted 2023/01/20) The title of the outgoing gift badge detail dialog"
|
||||
},
|
||||
"icu:modal--donation--title": {
|
||||
"messageformat": "Thanks for your support!",
|
||||
"description": "The title of the outgoing donation badge detail dialog"
|
||||
},
|
||||
"modal--giftBadge--description": {
|
||||
"message": "You've gifted a badge to $name$. When they accept, they'll be given a choice to show or hide their badge.",
|
||||
"description": "(deleted 2023/01/20) The description of the outgoing gift badge detail dialog"
|
||||
},
|
||||
"icu:modal--donation--description": {
|
||||
"messageformat": "You've made a donation to Signal on behalf of {name}. They'll be given the option to show their support on their profile.",
|
||||
"description": "The description of the outgoing donation badge detail dialog"
|
||||
|
@ -2911,14 +2799,6 @@
|
|||
"message": "Toggle video on and off",
|
||||
"description": "Shown in the shortcuts guide"
|
||||
},
|
||||
"Keyboard--accept-video-call": {
|
||||
"message": "Answer call with video",
|
||||
"description": "(deleted 2023/01/09) Shown in the calling keyboard shortcuts guide"
|
||||
},
|
||||
"Keyboard--accept-audio-call": {
|
||||
"message": "Answer call with audio",
|
||||
"description": "(deleted 2023/01/09) Shown in the calling keyboard shortcuts guide"
|
||||
},
|
||||
"icu:Keyboard--accept-video-call": {
|
||||
"messageformat": "Answer call with video (video calls only)",
|
||||
"description": "Shown in the calling keyboard shortcuts guide"
|
||||
|
@ -3315,14 +3195,6 @@
|
|||
"message": "Learn more.",
|
||||
"description": "Shown at the end of profile sharing messages as a link."
|
||||
},
|
||||
"ConversationHero--members": {
|
||||
"message": "$count$ members",
|
||||
"description": "(deleted 2022/11/21) Specifies the number of members in a group conversation"
|
||||
},
|
||||
"ConversationHero--members-1": {
|
||||
"message": "1 member",
|
||||
"description": "(deleted 2022/11/21) Specifies the number of members in a group conversation when there is one member"
|
||||
},
|
||||
"icu:ConversationHero--members": {
|
||||
"messageformat": "{count, plural, one {1 member} other {# members}}",
|
||||
"description": "Specifies the number of members in a group conversation"
|
||||
|
@ -4603,10 +4475,6 @@
|
|||
"message": "See all",
|
||||
"description": "This is a button on the conversation details to show all members"
|
||||
},
|
||||
"ConversationDetailsGroups--title": {
|
||||
"message": "$number$ groups in common",
|
||||
"description": "(deleted 2023/01/03) Title of the groups-in-common panel, in the contact details"
|
||||
},
|
||||
"icu:ConversationDetailsGroups--title": {
|
||||
"messageformat": "{count, plural, one {1 group} other {# groups}} in common",
|
||||
"description": "Title of the groups-in-common panel, in the contact details"
|
||||
|
@ -5471,25 +5339,9 @@
|
|||
"message": "$num$ contacts",
|
||||
"description": "Number of contacts blocked plural"
|
||||
},
|
||||
"Preferences__who-can--title": {
|
||||
"message": "Who can...",
|
||||
"description": "(deleted 2022/02/14) Title for the 'who can do X' setting"
|
||||
},
|
||||
"Preferences__privacy--description": {
|
||||
"message": "To change these settings, open the Signal app on your mobile device and navigate to Settings > Privacy",
|
||||
"description": "(deleted 2022/02/14) Description for the 'who can do X' setting"
|
||||
},
|
||||
"Preferences__who-can--everybody": {
|
||||
"message": "Everybody",
|
||||
"description": "(deleted 2022/02/14) Option for who can see my X select"
|
||||
},
|
||||
"Preferences__who-can--contacts": {
|
||||
"message": "My Contacts",
|
||||
"description": "(deleted 2022/02/14) Option for who can see my X select"
|
||||
},
|
||||
"Preferences__who-can--nobody": {
|
||||
"message": "Nobody",
|
||||
"description": "(deleted 2022/02/14) Option for who can see my X select"
|
||||
"description": "Description for the 'who can do X' setting"
|
||||
},
|
||||
"icu:Preferences__pnp__row--title": {
|
||||
"messageformat": "Phone Number",
|
||||
|
@ -5769,11 +5621,11 @@
|
|||
},
|
||||
"MyStories__views--singular": {
|
||||
"message": "$num$ view",
|
||||
"description": "(deleted 2022/10/13) Number of views your story has"
|
||||
"description": "Number of views your story has"
|
||||
},
|
||||
"MyStories__views--plural": {
|
||||
"message": "$num$ views",
|
||||
"description": "(deleted 2022/10/13) Number of views your story has"
|
||||
"description": "Number of views your story has"
|
||||
},
|
||||
"icu:MyStories__views": {
|
||||
"messageformat": "{views, plural, one {1 view} other {# views}}",
|
||||
|
@ -5947,10 +5799,6 @@
|
|||
"message": "Only you can see the name of this story.",
|
||||
"description": "Explanation about the visibility of custom distribution list names"
|
||||
},
|
||||
"icu:StoriesSettings__my-story-subtitle": {
|
||||
"messageformat": "All Signal connections",
|
||||
"description": "(deleted 2022/11/09) Story settings modal my story distribution list selection subtitle"
|
||||
},
|
||||
"icu:StoriesSettings__custom-story-subtitle": {
|
||||
"messageformat": "Custom story",
|
||||
"description": "Story settings modal custom story distribution list selection subtitle"
|
||||
|
@ -5959,14 +5807,6 @@
|
|||
"messageformat": "Group story",
|
||||
"description": "Story settings modal group story selection subtitle"
|
||||
},
|
||||
"StoriesSettings__viewers--singular": {
|
||||
"message": "$num$ viewer",
|
||||
"description": "(deleted 2022/10/21) A single viewer"
|
||||
},
|
||||
"StoriesSettings__viewers--plural": {
|
||||
"message": "$num$ viewers",
|
||||
"description": "(deleted 2022/10/21) More than one viewer"
|
||||
},
|
||||
"icu:StoriesSettings__viewers": {
|
||||
"messageformat": "{count, plural, one {1 viewer} other {# viewers}}",
|
||||
"description": "The number of viewers for a story distribution list"
|
||||
|
@ -6135,14 +5975,6 @@
|
|||
"message": "Visible only to specific people",
|
||||
"description": "Description of what a distribution list would do"
|
||||
},
|
||||
"SendStoryModal__new-private--title": {
|
||||
"message": "New private story",
|
||||
"description": "(deleted 2022/11/21) Create a new distribution list"
|
||||
},
|
||||
"SendStoryModal__new-private--description": {
|
||||
"message": "Visible only to specific people",
|
||||
"description": "(deleted 2022/11/21) Description of what a distribution list would do"
|
||||
},
|
||||
"SendStoryModal__new-group--title": {
|
||||
"message": "New group story",
|
||||
"description": "Select a group to send a story to"
|
||||
|
@ -6233,7 +6065,7 @@
|
|||
},
|
||||
"StoryViewer__views-off": {
|
||||
"message": "Views off",
|
||||
"description": "(deleted 2022/10/13) When the user has read receipts turned off"
|
||||
"description": "When the user has read receipts turned off"
|
||||
},
|
||||
"StoryViewer__sending": {
|
||||
"message": "Sending...",
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"sign-release": "node ts/updater/generateSignature.js",
|
||||
"notarize": "echo 'No longer necessary'",
|
||||
"get-strings": "node ts/scripts/get-strings.js && node ts/scripts/gen-nsis-script.js",
|
||||
"push-strings": "node ts/scripts/push-strings.js",
|
||||
"push-strings": "node ts/scripts/remove-strings.js && node ts/scripts/push-strings.js",
|
||||
"get-expire-time": "node ts/scripts/get-expire-time.js",
|
||||
"copy-components": "node ts/scripts/copy.js",
|
||||
"sass": "sass stylesheets/manifest.scss:stylesheets/manifest.css stylesheets/manifest_bridge.scss:stylesheets/manifest_bridge.css",
|
||||
|
|
66
ts/scripts/remove-strings.ts
Normal file
66
ts/scripts/remove-strings.ts
Normal file
|
@ -0,0 +1,66 @@
|
|||
// Copyright 2023 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { spawnSync } from 'child_process';
|
||||
import type { StdioOptions } from 'child_process';
|
||||
|
||||
import { MONTH } from '../util/durations';
|
||||
import { isOlderThan } from '../util/timestamp';
|
||||
|
||||
const ROOT_DIR = path.join(__dirname, '..', '..');
|
||||
const MESSAGES_FILE = path.join(ROOT_DIR, '_locales', 'en', 'messages.json');
|
||||
const SPAWN_OPTS = {
|
||||
cwd: ROOT_DIR,
|
||||
stdio: [null, 'pipe', 'inherit'] as StdioOptions,
|
||||
};
|
||||
|
||||
const messages = JSON.parse(fs.readFileSync(MESSAGES_FILE).toString());
|
||||
|
||||
const stillUsed = new Set<string>();
|
||||
|
||||
for (const [key, value] of Object.entries(messages)) {
|
||||
const match = (value as Record<string, string>).description?.match(
|
||||
/\(\s*deleted\s+(\d{4}\/\d{2}\/\d{2})\s*\)/
|
||||
);
|
||||
if (!match) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const deletedAt = new Date(match[1]).getTime();
|
||||
if (!isOlderThan(deletedAt, MONTH)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find uses in either:
|
||||
// - `i18n('key')`
|
||||
// - `<Intl id="key"/>`
|
||||
const { status, stdout } = spawnSync(
|
||||
'git',
|
||||
['grep', '--extended-regexp', `'${key}'|id="${key}"`],
|
||||
SPAWN_OPTS
|
||||
);
|
||||
|
||||
// Match found
|
||||
if (status === 0) {
|
||||
console.error(
|
||||
`ERROR: String is still used: "${key}", deleted on ${match[1]}`
|
||||
);
|
||||
console.error(stdout.toString().trim());
|
||||
console.error('');
|
||||
stillUsed.add(key);
|
||||
} else {
|
||||
console.log(`Removing string: "${key}", deleted on ${match[1]}`);
|
||||
delete messages[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (stillUsed.size !== 0) {
|
||||
console.error(
|
||||
`ERROR: Didn't remove ${[...stillUsed]} strings because of errors above`
|
||||
);
|
||||
console.error('ERROR: Not saving changes');
|
||||
process.exit(1);
|
||||
}
|
||||
fs.writeFileSync(MESSAGES_FILE, `${JSON.stringify(messages, null, 2)}\n`);
|
Loading…
Reference in a new issue