Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Tor Browser
Commits
0b53d576
Commit
0b53d576
authored
Oct 31, 2023
by
henry
Committed by
Pier Angelo Vendrame
Apr 10, 2024
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Tor Browser localization migration scripts.
Bug 42211: Migrate new identity strings to Fluent.
parent
dd9268c0
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!980
Bug 42512: Rebased alpha onto Firefox 115.10.0esr
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/torbrowser/l10n/migrations/bug-42211-new-identity.py
+48
-0
48 additions, 0 deletions
tools/torbrowser/l10n/migrations/bug-42211-new-identity.py
with
48 additions
and
0 deletions
tools/torbrowser/l10n/migrations/bug-42211-new-identity.py
0 → 100644
+
48
−
0
View file @
0b53d576
import
fluent.syntax.ast
as
FTL
from
fluent.migrate.helpers
import
TERM_REFERENCE
,
transforms_from
from
fluent.migrate.transforms
import
REPLACE
def
migrate
(
ctx
):
legacy_path
=
"
newIdentity.properties
"
ctx
.
add_transforms
(
"
base-browser.ftl
"
,
"
base-browser.ftl
"
,
transforms_from
(
"""
menu-new-identity =
.label = { COPY(path,
"
new_identity
"
) }
.accesskey = { COPY(path,
"
new_identity_menu_accesskey
"
) }
appmenuitem-new-identity =
.label = { COPY(path,
"
new_identity_sentence_case
"
) }
toolbar-new-identity =
.label = { COPY(path,
"
new_identity_sentence_case
"
) }
.tooltiptext = { toolbar-new-identity.label }
new-identity-dialog-title = { COPY(path,
"
new_identity_prompt_title
"
) }
new-identity-dialog-never-ask-checkbox =
.label = { COPY(path,
"
new_identity_ask_again
"
) }
new-identity-blocked-home-ignore-button = { COPY(path,
"
new_identity_home_load_button
"
) }
"""
,
path
=
legacy_path
,
)
+
[
# Replace "%S" with "{ -brand-short-name }" in confirm button.
FTL
.
Message
(
id
=
FTL
.
Identifier
(
"
new-identity-dialog-confirm
"
),
value
=
None
,
attributes
=
[
FTL
.
Attribute
(
id
=
FTL
.
Identifier
(
"
label
"
),
value
=
REPLACE
(
legacy_path
,
"
new_identity_restart
"
,
{
"
%1$S
"
:
TERM_REFERENCE
(
"
brand-short-name
"
)},
),
),
],
),
],
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment