1 # Any copyright is dedicated to the Public Domain.
2 # http://creativecommons.org/publicdomain/zero/1.0/
4 import fluent
.syntax
.ast
as FTL
5 from fluent
.migrate
.helpers
import TERM_REFERENCE
, VARIABLE_REFERENCE
6 from fluent
.migrate
.transforms
import (
16 """Bug 1793572 - Convert WebRTC strings to Fluent, part {index}."""
18 source
= "browser/chrome/browser/webrtcIndicator.properties"
19 browser
= "browser/chrome/browser/browser.properties"
20 browser_ftl
= "browser/browser/browser.ftl"
21 target
= "browser/browser/webrtcIndicator.ftl"
28 id=FTL
.Identifier("webrtc-indicator-window"),
31 id=FTL
.Identifier("title"),
32 value
=COPY_PATTERN(target
, "webrtc-indicator-title"),
37 id=FTL
.Identifier("webrtc-indicator-sharing-camera-and-microphone"),
40 id=FTL
.Identifier("tooltiptext"),
42 source
, "webrtcIndicator.sharingCameraAndMicrophone.tooltip"
48 id=FTL
.Identifier("webrtc-indicator-sharing-camera"),
51 id=FTL
.Identifier("tooltiptext"),
52 value
=COPY(source
, "webrtcIndicator.sharingCamera.tooltip"),
57 id=FTL
.Identifier("webrtc-indicator-sharing-microphone"),
60 id=FTL
.Identifier("tooltiptext"),
61 value
=COPY(source
, "webrtcIndicator.sharingMicrophone.tooltip"),
66 id=FTL
.Identifier("webrtc-indicator-sharing-application"),
69 id=FTL
.Identifier("tooltiptext"),
71 source
, "webrtcIndicator.sharingApplication.tooltip"
77 id=FTL
.Identifier("webrtc-indicator-sharing-screen"),
80 id=FTL
.Identifier("tooltiptext"),
81 value
=COPY(source
, "webrtcIndicator.sharingScreen.tooltip"),
86 id=FTL
.Identifier("webrtc-indicator-sharing-window"),
89 id=FTL
.Identifier("tooltiptext"),
90 value
=COPY(source
, "webrtcIndicator.sharingWindow.tooltip"),
95 id=FTL
.Identifier("webrtc-indicator-sharing-browser"),
98 id=FTL
.Identifier("tooltiptext"),
99 value
=COPY(source
, "webrtcIndicator.sharingBrowser.tooltip"),
104 id=FTL
.Identifier("webrtc-indicator-menuitem-control-sharing"),
107 id=FTL
.Identifier("label"),
108 value
=COPY(source
, "webrtcIndicator.controlSharing.menuitem"),
113 id=FTL
.Identifier("webrtc-indicator-menuitem-control-sharing-on"),
116 id=FTL
.Identifier("label"),
119 "webrtcIndicator.controlSharingOn.menuitem",
120 {"%1$S": VARIABLE_REFERENCE("streamTitle")},
126 id=FTL
.Identifier("webrtc-indicator-menuitem-sharing-camera-with"),
129 id=FTL
.Identifier("label"),
132 "webrtcIndicator.sharingCameraWith.menuitem",
133 {"%1$S": VARIABLE_REFERENCE("streamTitle")},
139 id=FTL
.Identifier("webrtc-indicator-menuitem-sharing-microphone-with"),
142 id=FTL
.Identifier("label"),
145 "webrtcIndicator.sharingMicrophoneWith.menuitem",
146 {"%1$S": VARIABLE_REFERENCE("streamTitle")},
152 id=FTL
.Identifier("webrtc-indicator-menuitem-sharing-application-with"),
155 id=FTL
.Identifier("label"),
158 "webrtcIndicator.sharingApplicationWith.menuitem",
159 {"%1$S": VARIABLE_REFERENCE("streamTitle")},
165 id=FTL
.Identifier("webrtc-indicator-menuitem-sharing-screen-with"),
168 id=FTL
.Identifier("label"),
171 "webrtcIndicator.sharingScreenWith.menuitem",
172 {"%1$S": VARIABLE_REFERENCE("streamTitle")},
178 id=FTL
.Identifier("webrtc-indicator-menuitem-sharing-window-with"),
181 id=FTL
.Identifier("label"),
184 "webrtcIndicator.sharingWindowWith.menuitem",
185 {"%1$S": VARIABLE_REFERENCE("streamTitle")},
191 id=FTL
.Identifier("webrtc-indicator-menuitem-sharing-browser-with"),
194 id=FTL
.Identifier("label"),
197 "webrtcIndicator.sharingBrowserWith.menuitem",
198 {"%1$S": VARIABLE_REFERENCE("streamTitle")},
205 "webrtc-indicator-menuitem-sharing-camera-with-n-tabs"
209 id=FTL
.Identifier("label"),
212 "webrtcIndicator.sharingCameraWithNTabs.menuitem",
213 VARIABLE_REFERENCE("tabCount"),
214 foreach
=lambda n
: REPLACE_IN_TEXT(
216 {"#1": VARIABLE_REFERENCE("tabCount")},
224 "webrtc-indicator-menuitem-sharing-microphone-with-n-tabs"
228 id=FTL
.Identifier("label"),
231 "webrtcIndicator.sharingMicrophoneWithNTabs.menuitem",
232 VARIABLE_REFERENCE("tabCount"),
233 foreach
=lambda n
: REPLACE_IN_TEXT(
235 {"#1": VARIABLE_REFERENCE("tabCount")},
243 "webrtc-indicator-menuitem-sharing-application-with-n-tabs"
247 id=FTL
.Identifier("label"),
250 "webrtcIndicator.sharingApplicationWithNTabs.menuitem",
251 VARIABLE_REFERENCE("tabCount"),
252 foreach
=lambda n
: REPLACE_IN_TEXT(
254 {"#1": VARIABLE_REFERENCE("tabCount")},
262 "webrtc-indicator-menuitem-sharing-screen-with-n-tabs"
266 id=FTL
.Identifier("label"),
269 "webrtcIndicator.sharingScreenWithNTabs.menuitem",
270 VARIABLE_REFERENCE("tabCount"),
271 foreach
=lambda n
: REPLACE_IN_TEXT(
273 {"#1": VARIABLE_REFERENCE("tabCount")},
281 "webrtc-indicator-menuitem-sharing-window-with-n-tabs"
285 id=FTL
.Identifier("label"),
288 "webrtcIndicator.sharingWindowWithNTabs.menuitem",
289 VARIABLE_REFERENCE("tabCount"),
290 foreach
=lambda n
: REPLACE_IN_TEXT(
292 {"#1": VARIABLE_REFERENCE("tabCount")},
300 "webrtc-indicator-menuitem-sharing-browser-with-n-tabs"
304 id=FTL
.Identifier("label"),
307 "webrtcIndicator.sharingBrowserWithNTabs.menuitem",
308 VARIABLE_REFERENCE("tabCount"),
309 foreach
=lambda n
: REPLACE_IN_TEXT(
311 {"#1": VARIABLE_REFERENCE("tabCount")},
318 id=FTL
.Identifier("webrtc-item-camera"),
321 "getUserMedia.sharingMenuCamera",
323 "%1$S (": FTL
.TextElement(""),
324 "%1$S(": FTL
.TextElement(""),
325 ")": FTL
.TextElement(""),
326 ")": FTL
.TextElement(""),
331 id=FTL
.Identifier("webrtc-item-microphone"),
334 "getUserMedia.sharingMenuMicrophone",
336 "%1$S (": FTL
.TextElement(""),
337 "%1$S(": FTL
.TextElement(""),
338 ")": FTL
.TextElement(""),
339 ")": FTL
.TextElement(""),
344 id=FTL
.Identifier("webrtc-item-audio-capture"),
347 "getUserMedia.sharingMenuAudioCapture",
349 "%1$S (": FTL
.TextElement(""),
350 "%1$S(": FTL
.TextElement(""),
351 ")": FTL
.TextElement(""),
352 ")": FTL
.TextElement(""),
357 id=FTL
.Identifier("webrtc-item-application"),
360 "getUserMedia.sharingMenuApplication",
362 "%1$S (": FTL
.TextElement(""),
363 "%1$S(": FTL
.TextElement(""),
364 ")": FTL
.TextElement(""),
365 ")": FTL
.TextElement(""),
370 id=FTL
.Identifier("webrtc-item-screen"),
373 "getUserMedia.sharingMenuScreen",
375 "%1$S (": FTL
.TextElement(""),
376 "%1$S(": FTL
.TextElement(""),
377 ")": FTL
.TextElement(""),
378 ")": FTL
.TextElement(""),
383 id=FTL
.Identifier("webrtc-item-window"),
386 "getUserMedia.sharingMenuWindow",
388 "%1$S (": FTL
.TextElement(""),
389 "%1$S(": FTL
.TextElement(""),
390 ")": FTL
.TextElement(""),
391 ")": FTL
.TextElement(""),
396 id=FTL
.Identifier("webrtc-item-browser"),
399 "getUserMedia.sharingMenuBrowser",
401 "%1$S (": FTL
.TextElement(""),
402 "%1$S(": FTL
.TextElement(""),
403 ")": FTL
.TextElement(""),
404 ")": FTL
.TextElement(""),
409 id=FTL
.Identifier("webrtc-sharing-menuitem-unknown-host"),
410 value
=COPY(browser
, "getUserMedia.sharingMenuUnknownHost"),
413 id=FTL
.Identifier("webrtc-sharing-menuitem"),
416 id=FTL
.Identifier("label"),
418 [FTL
.TextElement("{ $origin } ({ $itemList })")]
424 id=FTL
.Identifier("webrtc-sharing-menu"),
427 id=FTL
.Identifier("label"),
428 value
=COPY(browser
, "getUserMedia.sharingMenu.label"),
431 id=FTL
.Identifier("accesskey"),
432 value
=COPY(browser
, "getUserMedia.sharingMenu.accesskey"),
437 id=FTL
.Identifier("webrtc-allow-share-camera"),
440 "getUserMedia.shareCamera3.message",
441 {"%1$S": VARIABLE_REFERENCE("origin")},
445 id=FTL
.Identifier("webrtc-allow-share-microphone"),
448 "getUserMedia.shareMicrophone3.message",
449 {"%1$S": VARIABLE_REFERENCE("origin")},
453 id=FTL
.Identifier("webrtc-allow-share-screen"),
456 "getUserMedia.shareScreen4.message",
457 {"%1$S": VARIABLE_REFERENCE("origin")},
461 id=FTL
.Identifier("webrtc-allow-share-camera-and-microphone"),
464 "getUserMedia.shareCameraAndMicrophone3.message",
465 {"%1$S": VARIABLE_REFERENCE("origin")},
469 id=FTL
.Identifier("webrtc-allow-share-camera-and-audio-capture"),
472 "getUserMedia.shareCameraAndAudioCapture3.message",
473 {"%1$S": VARIABLE_REFERENCE("origin")},
477 id=FTL
.Identifier("webrtc-allow-share-screen-and-microphone"),
480 "getUserMedia.shareScreenAndMicrophone4.message",
481 {"%1$S": VARIABLE_REFERENCE("origin")},
485 id=FTL
.Identifier("webrtc-allow-share-screen-and-audio-capture"),
488 "getUserMedia.shareScreenAndAudioCapture4.message",
489 {"%1$S": VARIABLE_REFERENCE("origin")},
493 id=FTL
.Identifier("webrtc-allow-share-audio-capture"),
496 "getUserMedia.shareAudioCapture3.message",
497 {"%1$S": VARIABLE_REFERENCE("origin")},
501 id=FTL
.Identifier("webrtc-allow-share-speaker"),
504 "selectAudioOutput.shareSpeaker.message",
505 {"%1$S": VARIABLE_REFERENCE("origin")},
509 id=FTL
.Identifier("webrtc-allow-share-camera-unsafe-delegation"),
512 "getUserMedia.shareCameraUnsafeDelegation2.message",
514 "%1$S": VARIABLE_REFERENCE("origin"),
515 "%2$S": VARIABLE_REFERENCE("thirdParty"),
520 id=FTL
.Identifier("webrtc-allow-share-microphone-unsafe-delegations"),
523 "getUserMedia.shareMicrophoneUnsafeDelegations2.message",
525 "%1$S": VARIABLE_REFERENCE("origin"),
526 "%2$S": VARIABLE_REFERENCE("thirdParty"),
531 id=FTL
.Identifier("webrtc-allow-share-screen-unsafe-delegation"),
534 "getUserMedia.shareScreenUnsafeDelegation2.message",
536 "%1$S": VARIABLE_REFERENCE("origin"),
537 "%2$S": VARIABLE_REFERENCE("thirdParty"),
543 "webrtc-allow-share-camera-and-microphone-unsafe-delegation"
547 "getUserMedia.shareCameraAndMicrophoneUnsafeDelegation2.message",
549 "%1$S": VARIABLE_REFERENCE("origin"),
550 "%2$S": VARIABLE_REFERENCE("thirdParty"),
556 "webrtc-allow-share-camera-and-audio-capture-unsafe-delegation"
560 "getUserMedia.shareCameraAndAudioCaptureUnsafeDelegation2.message",
562 "%1$S": VARIABLE_REFERENCE("origin"),
563 "%2$S": VARIABLE_REFERENCE("thirdParty"),
569 "webrtc-allow-share-screen-and-microphone-unsafe-delegation"
573 "getUserMedia.shareScreenAndMicrophoneUnsafeDelegation2.message",
575 "%1$S": VARIABLE_REFERENCE("origin"),
576 "%2$S": VARIABLE_REFERENCE("thirdParty"),
582 "webrtc-allow-share-screen-and-audio-capture-unsafe-delegation"
586 "getUserMedia.shareScreenAndAudioCaptureUnsafeDelegation2.message",
588 "%1$S": VARIABLE_REFERENCE("origin"),
589 "%2$S": VARIABLE_REFERENCE("thirdParty"),
594 id=FTL
.Identifier("webrtc-allow-share-speaker-unsafe-delegation"),
597 "selectAudioOutput.shareSpeakerUnsafeDelegation.message",
599 "%1$S": VARIABLE_REFERENCE("origin"),
600 "%2$S": VARIABLE_REFERENCE("thirdParty"),
605 id=FTL
.Identifier("webrtc-share-screen-warning"),
606 value
=COPY(browser
, "getUserMedia.shareScreenWarning2.message"),
609 id=FTL
.Identifier("webrtc-share-browser-warning"),
612 "getUserMedia.shareFirefoxWarning2.message",
613 {"%1$S": TERM_REFERENCE("brand-short-name")},
617 id=FTL
.Identifier("webrtc-share-screen-learn-more"),
618 value
=COPY(browser
, "getUserMedia.shareScreen.learnMoreLabel"),
621 id=FTL
.Identifier("webrtc-pick-window-or-screen"),
622 value
=COPY(browser
, "getUserMedia.pickWindowOrScreen.label"),
625 id=FTL
.Identifier("webrtc-share-entire-screen"),
626 value
=COPY(browser
, "getUserMedia.shareEntireScreen.label"),
629 id=FTL
.Identifier("webrtc-share-pipe-wire-portal"),
630 value
=COPY(browser
, "getUserMedia.sharePipeWirePortal.label"),
633 id=FTL
.Identifier("webrtc-share-monitor"),
636 "getUserMedia.shareMonitor.label",
637 {"%1$S": VARIABLE_REFERENCE("monitorIndex")},
641 id=FTL
.Identifier("webrtc-share-application"),
644 "getUserMedia.shareApplicationWindowCount.label",
645 VARIABLE_REFERENCE("windowCount"),
646 foreach
=lambda n
: REPLACE_IN_TEXT(
649 "#1": VARIABLE_REFERENCE("appName"),
650 "#2": VARIABLE_REFERENCE("windowCount"),
656 id=FTL
.Identifier("webrtc-action-allow"),
659 id=FTL
.Identifier("label"),
660 value
=COPY(browser
, "getUserMedia.allow.label"),
663 id=FTL
.Identifier("accesskey"),
664 value
=COPY(browser
, "getUserMedia.allow.accesskey"),
669 id=FTL
.Identifier("webrtc-action-block"),
672 id=FTL
.Identifier("label"),
674 browser_ftl
, "popup-screen-sharing-block.label"
678 id=FTL
.Identifier("accesskey"),
680 browser_ftl
, "popup-screen-sharing-block.accesskey"
686 id=FTL
.Identifier("webrtc-action-always-block"),
689 id=FTL
.Identifier("label"),
691 browser_ftl
, "popup-screen-sharing-always-block.label"
695 id=FTL
.Identifier("accesskey"),
698 "popup-screen-sharing-always-block.accesskey",
704 id=FTL
.Identifier("webrtc-action-not-now"),
707 id=FTL
.Identifier("label"),
708 value
=COPY(browser
, "getUserMedia.notNow.label"),
711 id=FTL
.Identifier("accesskey"),
712 value
=COPY(browser
, "getUserMedia.notNow.accesskey"),
717 id=FTL
.Identifier("webrtc-remember-allow-checkbox"),
718 value
=COPY(browser
, "getUserMedia.remember"),
721 id=FTL
.Identifier("webrtc-mute-notifications-checkbox"),
722 value
=COPY_PATTERN(browser_ftl
, "popup-mute-notifications-checkbox"),
725 id=FTL
.Identifier("webrtc-reason-for-no-permanent-allow-screen"),
728 "getUserMedia.reasonForNoPermanentAllow.screen3",
729 {"%1$S": TERM_REFERENCE("brand-short-name")},
733 id=FTL
.Identifier("webrtc-reason-for-no-permanent-allow-audio"),
736 "getUserMedia.reasonForNoPermanentAllow.audio",
737 {"%1$S": TERM_REFERENCE("brand-short-name")},
741 id=FTL
.Identifier("webrtc-reason-for-no-permanent-allow-insecure"),
744 "getUserMedia.reasonForNoPermanentAllow.insecure",
745 {"%1$S": TERM_REFERENCE("brand-short-name")},
756 id=FTL
.Identifier("popup-select-window-or-screen"),
759 id=FTL
.Identifier("label"),
760 value
=COPY(browser
, "getUserMedia.selectWindowOrScreen2.label"),
763 id=FTL
.Identifier("accesskey"),
765 browser
, "getUserMedia.selectWindowOrScreen2.accesskey"