Best Python code snippet using lisa_python
bug_1615501_preferences.py
Source:bug_1615501_preferences.py  
1# Any copyright is dedicated to the Public Domain.2# http://creativecommons.org/publicdomain/zero/1.0/3from __future__ import absolute_import4import fluent.syntax.ast as FTL5from fluent.migrate.helpers import transforms_from6from fluent.migrate import CONCAT, REPLACE7from fluent.migrate.helpers import COPY, TERM_REFERENCE, MESSAGE_REFERENCE8def migrate(ctx):9    """Bug 1615501 - Fluent migration recipe for Preferences Tab, part {index}."""10    ctx.add_transforms(11        "mail/messenger/preferences/preferences.ftl",12        "mail/messenger/preferences/preferences.ftl",13        transforms_from(14            """15close-button =16    .aria-label = { COPY(from_path, "preferencesCloseButton.label") }17preferences-title =18    .title = { PLATFORM() ->19        [windows] { COPY(from_path, "prefWindow.titleWin") }20        *[other] { COPY(from_path, "prefWindow.titleMAC") }21    }22pane-compose-title = { COPY(from_path, "paneComposition.title") }23category-compose =24    .tooltiptext = { COPY(from_path, "paneComposition.title") }25pane-privacy-title = { COPY(from_path, "panePrivacySecurity.title") }26category-privacy =27    .tooltiptext = { COPY(from_path, "panePrivacySecurity.title") }28pane-chat-title = { COPY(from_path, "paneChat.title") }29category-chat =30    .tooltiptext = { COPY(from_path, "paneChat.title") }31addons-button = { COPY(from_path, "addonsButton.label") }32""",33            from_path="mail/chrome/messenger/preferences/preferences.dtd",34        ),35    )36    ctx.add_transforms(37        "mail/messenger/preferences/preferences.ftl",38        "mail/messenger/preferences/preferences.ftl",39        transforms_from(40            """41pane-calendar-title = { COPY(from_path, "lightning.preferencesLabel") }42category-calendar =43    .tooltiptext = { COPY(from_path, "lightning.preferencesLabel") }44""",45            from_path="calendar/chrome/lightning/lightning.dtd",46        ),47    )48    ctx.add_transforms(49        "mail/messenger/preferences/preferences.ftl",50        "mail/messenger/preferences/preferences.ftl",51        transforms_from(52            """53location-label =54    .value = { COPY(from_path, "location.label") }55    .accesskey = { COPY(from_path, "location1.accesskey") }56restore-default-label =57    .label = { COPY(from_path, "useDefault.label") }58    .accesskey = { COPY(from_path, "useDefault.accesskey") }59default-search-engine = { COPY(from_path, "defaultSearchEngine.label") }60add-search-engine =61    .label = { COPY(from_path, "addSearchEngine.label") }62    .accesskey = { COPY(from_path, "addSearchEngine.accesskey") }63remove-search-engine =64    .label = { COPY(from_path, "removeSearchEngine.label") }65    .accesskey = { COPY(from_path, "removeSearchEngine.accesskey") }66new-message-arrival = { COPY(from_path, "newMessagesArrive.label") }67change-dock-icon = { COPY(from_path, "changeDockIconOptions.label") }68app-icon-options =69    .label = { COPY(from_path, "dockOptions.label") }70    .accesskey = { COPY(from_path, "dockOptions.accesskey") }71notification-settings = { COPY(from_path, "notificationAlertSettings2.label") }72animated-alert-label =73    .label = { COPY(from_path, "showAnimatedAlert.label") }74    .accesskey = { COPY(from_path, "showAnimatedAlert.accesskey") }75customize-alert-label =76    .label = { COPY(from_path, "customizeMailAlert.label") }77    .accesskey = { COPY(from_path, "customizeMailAlert.accesskey") }78tray-icon-label =79    .label = { COPY(from_path, "showTrayIcon.label") }80    .accesskey = { COPY(from_path, "showTrayIcon.accesskey") }81mail-play-sound-label =82    .label = { PLATFORM() ->83        [macos] { COPY(from_path, "playSoundMac.label") }84        *[other] { COPY(from_path, "playSound.label") }85    }86    .accesskey = { PLATFORM() ->87        [macos] { COPY(from_path, "playSoundMac.accesskey") }88        *[other] { COPY(from_path, "playSound1.accesskey") }89    }90mail-play-button =91    .label = { COPY(from_path, "play.label") }92    .accesskey = { COPY(from_path, "play.accesskey") }93mail-system-sound-label =94    .label = { COPY(from_path, "systemSound.label") }95    .accesskey = { COPY(from_path, "systemSound.accesskey") }96mail-custom-sound-label =97    .label = { COPY(from_path, "customsound.label") }98    .accesskey = { COPY(from_path, "customsound.accesskey") }99mail-browse-sound-button =100    .label = { COPY(from_path, "browse.label") }101    .accesskey = { COPY(from_path, "browse.accesskey") }102""",103            from_path="mail/chrome/messenger/preferences/general.dtd",104        ),105    )106    ctx.add_transforms(107        "mail/messenger/preferences/preferences.ftl",108        "mail/messenger/preferences/preferences.ftl",109        [110            FTL.Message(111                id=FTL.Identifier("general-legend"),112                value=REPLACE(113                    "mail/chrome/messenger/preferences/general.dtd",114                    "messengerStartPage.label",115                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},116                ),117            ),118            FTL.Message(119                id=FTL.Identifier("start-page-label"),120                attributes=[121                    FTL.Attribute(122                        id=FTL.Identifier("label"),123                        value=REPLACE(124                            "mail/chrome/messenger/preferences/general.dtd",125                            "enableStartPage.label",126                            {"&brandShortName;": TERM_REFERENCE("brand-short-name")},127                        ),128                    ),129                    FTL.Attribute(130                        id=FTL.Identifier("accesskey"),131                        value=COPY(132                            "mail/chrome/messenger/preferences/general.dtd",133                            "enableStartPage.accesskey",134                        ),135                    ),136                ],137            ),138            FTL.Message(139                id=FTL.Identifier("minimize-to-tray-label"),140                attributes=[141                    FTL.Attribute(142                        id=FTL.Identifier("label"),143                        value=REPLACE(144                            "mail/chrome/messenger/preferences/general.dtd",145                            "minimizeToTray.label",146                            {"&brandShortName;": TERM_REFERENCE("brand-short-name")},147                        ),148                    ),149                    FTL.Attribute(150                        id=FTL.Identifier("accesskey"),151                        value=COPY(152                            "mail/chrome/messenger/preferences/general.dtd",153                            "minimizeToTray.accesskey",154                        ),155                    ),156                ],157            ),158        ],159    )160    ctx.add_transforms(161        "mail/messenger/preferences/preferences.ftl",162        "mail/messenger/preferences/preferences.ftl",163        transforms_from(164            """165enable-gloda-search-label =166    .label = { COPY(from_path, "enableGlodaSearch.label") }167    .accesskey = { COPY(from_path, "enableGlodaSearch.accesskey") }168datetime-formatting-legend = { COPY(from_path, "dateTimeFormatting.label") }169language-selector-legend = { COPY(from_path, "languageSelector.label") }170allow-hw-accel =171    .label = { COPY(from_path, "allowHWAccel.label") }172    .accesskey = { COPY(from_path, "allowHWAccel.accesskey") }173store-type-label =174    .value = { COPY(from_path, "storeType.label") }175    .accesskey = { COPY(from_path, "storeType.accesskey") }176mbox-store-label =177    .label = { COPY(from_path, "mboxStore2.label") }178maildir-store-label =179    .label = { COPY(from_path, "maildirStore.label") }180scrolling-legend = { COPY(from_path, "scrolling.label") }181autoscroll-label =182    .label = { COPY(from_path, "useAutoScroll.label") }183    .accesskey = { COPY(from_path, "useAutoScroll.accesskey") }184smooth-scrolling-label =185    .label = { COPY(from_path, "useSmoothScrolling.label") }186    .accesskey = { COPY(from_path, "useSmoothScrolling.accesskey") }187system-integration-legend = { COPY(from_path, "systemIntegration.label") }188check-default-button =189    .label = { COPY(from_path, "checkDefaultsNow.label") }190    .accesskey = { COPY(from_path, "checkDefaultsNow.accesskey") }191search-engine-name = { PLATFORM() ->192    [macos] { COPY("mail/chrome/messenger/searchIntegrationMac.dtd", "searchIntegration.engineName") }193    [windows] { COPY("mail/chrome/messenger/searchIntegrationWin.dtd", "searchIntegration.engineName") }194    *[other] { COPY("mail/chrome/messenger/searchIntegrationDefault.dtd", "searchIntegration.engineName") }195}196config-editor-button =197    .label = { COPY(from_path, "configEdit.label") }198    .accesskey = { COPY(from_path, "configEdit.accesskey") }199return-receipts-button =200    .label = { COPY(from_path, "showReturnReceipts.label") }201    .accesskey = { COPY(from_path, "showReturnReceipts.accesskey") }202automatic-updates-label =203    .label = { COPY(from_path, "updateAuto.label") }204    .accesskey = { COPY(from_path, "updateAuto.accesskey") }205check-updates-label =206    .label = { COPY(from_path, "updateCheck.label") }207    .accesskey = { COPY(from_path, "updateCheck.accesskey") }208update-history-button =209    .label = { COPY(from_path, "updateHistory.label") }210    .accesskey = { COPY(from_path, "updateHistory.accesskey") }211use-service =212    .label = { COPY(from_path, "useService.label") }213    .accesskey = { COPY(from_path, "useService.accesskey") }214network-settings-button =215    .label = { COPY(from_path, "showSettings.label") }216    .accesskey = { COPY(from_path, "showSettings.accesskey") }217networking-legend = { COPY(from_path, "connectionsInfo.caption") }218offline-legend = { COPY(from_path, "offlineInfo.caption") }219offline-settings = { COPY(from_path, "offlineInfo.label") }220offline-settings-button =221    .label = { COPY(from_path, "showOffline.label") }222    .accesskey = { COPY(from_path, "showOffline.accesskey") }223diskspace-legend = { COPY(from_path, "Diskspace") }224offline-compact-folder =225    .label = { COPY(from_path, "offlineCompactFolders.label") }226    .accesskey = { COPY(from_path, "offlineCompactFolders.accesskey") }227compact-folder-size =228    .value = { COPY(from_path, "offlineCompactFoldersMB.label") }229use-cache-before =230    .value = { COPY(from_path, "useCacheBefore.label") }231    .accesskey = { COPY(from_path, "useCacheBefore.accesskey") }232use-cache-after = { COPY(from_path, "useCacheAfter.label") }233smart-cache-label =234    .label = { COPY(from_path, "overrideSmartCacheSize.label") }235    .accesskey = { COPY(from_path, "overrideSmartCacheSize.accesskey") }236clear-cache-button =237    .label = { COPY(from_path, "clearCacheNow.label") }238    .accesskey = { COPY(from_path, "clearCacheNow.accesskey") }239update-app-version = { COPY(from_path, "updateApp.version.pre") }{ $version }{ COPY(from_path, "updateApp.version.post") }240""",241            from_path="mail/chrome/messenger/preferences/advanced.dtd",242        ),243    )244    ctx.add_transforms(245        "mail/messenger/preferences/preferences.ftl",246        "mail/messenger/preferences/preferences.ftl",247        [248            FTL.Message(249                id=FTL.Identifier("return-receipts-description"),250                value=REPLACE(251                    "mail/chrome/messenger/preferences/advanced.dtd",252                    "returnReceiptsInfo.label",253                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},254                ),255            ),256            FTL.Message(257                id=FTL.Identifier("update-app-legend"),258                value=REPLACE(259                    "mail/chrome/messenger/preferences/advanced.dtd",260                    "updateApp2.label",261                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},262                ),263            ),264            FTL.Message(265                id=FTL.Identifier("allow-description"),266                value=REPLACE(267                    "mail/chrome/messenger/preferences/advanced.dtd",268                    "updateAppAllow.description",269                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},270                ),271            ),272            FTL.Message(273                id=FTL.Identifier("cross-user-udpate-warning"),274                value=REPLACE(275                    "mail/chrome/messenger/preferences/advanced.dtd",276                    "updateCrossUserSettingWarning.description",277                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},278                ),279            ),280            FTL.Message(281                id=FTL.Identifier("proxy-config-description"),282                value=REPLACE(283                    "mail/chrome/messenger/preferences/advanced.dtd",284                    "proxiesConfigure.label",285                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},286                ),287            ),288            FTL.Message(289                id=FTL.Identifier("always-check-default"),290                attributes=[291                    FTL.Attribute(292                        id=FTL.Identifier("label"),293                        value=REPLACE(294                            "mail/chrome/messenger/preferences/advanced.dtd",295                            "alwaysCheckDefault.label",296                            {"&brandShortName;": TERM_REFERENCE("brand-short-name")},297                        ),298                    ),299                    FTL.Attribute(300                        id=FTL.Identifier("accesskey"),301                        value=COPY(302                            "mail/chrome/messenger/preferences/advanced.dtd",303                            "alwaysCheckDefault.accesskey",304                        ),305                    ),306                ],307            ),308            FTL.Message(309                id=FTL.Identifier("search-integration-label"),310                attributes=[311                    FTL.Attribute(312                        id=FTL.Identifier("label"),313                        value=REPLACE(314                            "mail/chrome/messenger/preferences/advanced.dtd",315                            "searchIntegration.label",316                            {317                                "&searchIntegration.engineName;": MESSAGE_REFERENCE(318                                    "search-engine-name"319                                )320                            },321                        ),322                    ),323                    FTL.Attribute(324                        id=FTL.Identifier("accesskey"),325                        value=COPY(326                            "mail/chrome/messenger/preferences/advanced.dtd",327                            "searchIntegration.accesskey",328                        ),329                    ),330                ],331            ),332        ],333    )334    ctx.add_transforms(335        "mail/messenger/preferences/preferences.ftl",336        "mail/messenger/preferences/preferences.ftl",337        transforms_from(338            """339focus-search-shortcut =340    .key = { COPY(from_path, "focusSearch1.key") }341focus-search-shortcut-alt =342    .key = { COPY(from_path, "focusSearch2.key") }343search-input =344    .placeholder = { COPY(from_path, "filter.placeholder") }345type-column-label =346    .label = { COPY(from_path, "typeColumn.label") }347    .accesskey = { COPY(from_path, "typeColumn.accesskey") }348action-column-label =349    .label = { COPY(from_path, "actionColumn2.label") }350    .accesskey = { COPY(from_path, "actionColumn2.accesskey") }351save-to-label =352    .label = { COPY(from_path, "saveTo.label") }353    .accesskey = { COPY(from_path, "saveTo.accesskey") }354choose-folder-label =355    .label = { PLATFORM() ->356        [macos] { COPY(from_path, "chooseFolderMac.label") }357        *[other] { COPY(from_path, "chooseFolderWin.label") }358    }359    .accesskey = { PLATFORM() ->360        [macos] { COPY(from_path, "chooseFolderMac.accesskey") }361        *[other] { COPY(from_path, "chooseFolderWin.accesskey") }362    }363always-ask-label =364    .label = { COPY(from_path, "alwaysAsk.label") }365    .accesskey = { COPY(from_path, "alwaysAsk.accesskey") }366""",367            from_path="mail/chrome/messenger/preferences/applications.dtd",368        ),369    )370    ctx.add_transforms(371        "mail/messenger/preferences/preferences.ftl",372        "mail/messenger/preferences/preferences.ftl",373        transforms_from(374            """375fonts-legend = { COPY(from_path, "fontsAndColors1.label") }376default-font-label =377    .value = { COPY(from_path, "defaultFont.label") }378    .accesskey = { COPY(from_path, "defaultFont.accesskey") }379default-size-label =380    .value = { COPY(from_path, "defaultSize.label") }381    .accesskey = { COPY(from_path, "defaultSize.accesskey") }382font-options-button =383    .label = { COPY(from_path, "fontOptions.label") }384    .accesskey = { COPY(from_path, "fontOptions.accesskey") }385color-options-button =386    .label = { COPY(from_path, "colorButton.label") }387    .accesskey = { COPY(from_path, "colorButton.accesskey") }388display-width-legend = { COPY(from_path, "displayWidth.label") }389convert-emoticons-label =390    .label = { COPY(from_path, "convertEmoticons.label") }391    .accesskey = { COPY(from_path, "convertEmoticons.accesskey") }392display-text-label = { COPY(from_path, "displayText.label") }393style-label =394    .value = { COPY(from_path, "style.label") }395    .accesskey = { COPY(from_path, "style.accesskey") }396regular-style-item =397    .label = { COPY(from_path, "regularStyle.label") }398bold-style-item =399    .label = { COPY(from_path, "bold.label") }400italic-style-item =401    .label = { COPY(from_path, "italic.label") }402bold-italic-style-item =403    .label = { COPY(from_path, "boldItalic.label") }404size-label =405    .value = { COPY(from_path, "size.label") }406    .accesskey = { COPY(from_path, "size.accesskey") }407regular-size-item =408    .label = { COPY(from_path, "regularSize.label") }409bigger-size-item =410    .label = { COPY(from_path, "bigger.label") }411smaller-size-item =412    .label = { COPY(from_path, "smaller.label") }413quoted-text-color =414    .label = { COPY(from_path, "quotedTextColor.label") }415    .accesskey = { COPY(from_path, "quotedTextColor.accesskey") }416display-tags-text = { COPY(from_path, "displayTagsText.label") }417new-tag-button =418    .label = { COPY(from_path, "newTagButton.label") }419    .accesskey = { COPY(from_path, "newTagButton.accesskey") }420edit-tag-button =421    .label = { COPY(from_path, "editTagButton1.label") }422    .accesskey = { COPY(from_path, "editTagButton1.accesskey") }423delete-tag-button =424    .label = { COPY(from_path, "removeTagButton.label") }425    .accesskey = { COPY(from_path, "removeTagButton.accesskey") }426auto-mark-as-read =427    .label = { COPY(from_path, "autoMarkAsRead.label") }428    .accesskey = { COPY(from_path, "autoMarkAsRead.accesskey") }429mark-read-no-delay =430    .label = { COPY(from_path, "markAsReadNoDelay.label") }431    .accesskey = { COPY(from_path, "markAsReadNoDelay.accesskey") }432mark-read-delay =433    .label = { COPY(from_path, "markAsReadDelay.label") }434    .accesskey = { COPY(from_path, "markAsReadDelay.accesskey") }435seconds-label = { COPY(from_path, "secondsLabel.label") }436open-msg-label =437    .value = { COPY(from_path, "openMsgIn.label") }438open-msg-tab =439    .label = { COPY(from_path, "openMsgInNewTab.label") }440    .accesskey = { COPY(from_path, "openMsgInNewTab.accesskey") }441open-msg-window =442    .label = { COPY(from_path, "reuseExpRadio0.label") }443    .accesskey = { COPY(from_path, "reuseExpRadio0.accesskey") }444open-msg-ex-window =445    .label = { COPY(from_path, "reuseExpRadio1.label") }446    .accesskey = { COPY(from_path, "reuseExpRadio1.accesskey") }447close-move-delete =448    .label = { COPY(from_path, "closeMsgOnMoveOrDelete.label") }449    .accesskey = { COPY(from_path, "closeMsgOnMoveOrDelete.accesskey") }450display-name-label =451    .value = { COPY(from_path, "displayName.label") }452condensed-addresses-label =453    .label = { COPY(from_path, "showCondensedAddresses.label") }454    .accesskey = { COPY(from_path, "showCondensedAddresses.accesskey") }455""",456            from_path="mail/chrome/messenger/preferences/display.dtd",457        ),458    )459    ctx.add_transforms(460        "mail/messenger/preferences/preferences.ftl",461        "mail/messenger/preferences/preferences.ftl",462        [463            FTL.Message(464                id=FTL.Identifier("return-receipts-description"),465                value=REPLACE(466                    "mail/chrome/messenger/preferences/advanced.dtd",467                    "returnReceiptsInfo.label",468                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},469                ),470            ),471            FTL.Message(472                id=FTL.Identifier("always-check-default"),473                attributes=[474                    FTL.Attribute(475                        id=FTL.Identifier("label"),476                        value=REPLACE(477                            "mail/chrome/messenger/preferences/advanced.dtd",478                            "alwaysCheckDefault.label",479                            {"&brandShortName;": TERM_REFERENCE("brand-short-name")},480                        ),481                    ),482                    FTL.Attribute(483                        id=FTL.Identifier("accesskey"),484                        value=COPY(485                            "mail/chrome/messenger/preferences/advanced.dtd",486                            "alwaysCheckDefault.accesskey",487                        ),488                    ),489                ],490            ),491        ],492    )493    ctx.add_transforms(494        "mail/messenger/preferences/preferences.ftl",495        "mail/messenger/preferences/preferences.ftl",496        transforms_from(497            """498forward-label =499    .value = { COPY(from_path, "forwardMsg.label") }500    .accesskey = { COPY(from_path, "forwardMsg.accesskey") }501inline-label =502    .label = { COPY(from_path, "inline.label") }503as-attachment-label =504    .label = { COPY(from_path, "asAttachment.label") }505extension-label =506    .label = { COPY(from_path, "addExtension.label") }507    .accesskey = { COPY(from_path, "addExtension.accesskey") }508auto-save-label =509    .label = { COPY(from_path, "autoSave.label") }510    .accesskey = { COPY(from_path, "autoSave.accesskey") }511auto-save-end = { COPY(from_path, "autoSaveEnd.label") }512warn-on-send-accel-key =513    .label = { COPY(from_path, "warnOnSendAccelKey.label") }514    .accesskey = { COPY(from_path, "warnOnSendAccelKey.accesskey") }515spellcheck-label =516    .label = { COPY(from_path, "spellCheck.label") }517    .accesskey = { COPY(from_path, "spellCheck.accesskey") }518spellcheck-inline-label =519    .label = { COPY(from_path, "spellCheckInline.label") }520    .accesskey = { COPY(from_path, "spellCheckInline1.accesskey") }521language-popup-label =522    .value = { COPY(from_path, "languagePopup.label") }523    .accesskey = { COPY(from_path, "languagePopup.accessKey") }524download-dictionaries-link = { COPY(from_path, "downloadDictionaries.label") }525font-label =526    .value = { COPY(from_path, "font.label") }527    .accesskey = { COPY(from_path, "font.accesskey") }528font-size-label =529    .value = { COPY(from_path, "fontSize.label") }530    .accesskey = { COPY(from_path, "fontSize.accesskey") }531default-colors-label =532    .label = { COPY(from_path, "useReaderDefaults.label") }533    .accesskey = { COPY(from_path, "useReaderDefaults.accesskey") }534font-color-label =535    .value = { COPY(from_path, "fontColor.label") }536    .accesskey = { COPY(from_path, "fontColor.accesskey") }537bg-color-label =538    .value = { COPY(from_path, "bgColor.label") }539    .accesskey = { COPY(from_path, "bgColor.accesskey") }540restore-html-label =541    .label = { COPY(from_path, "restoreHTMLDefaults.label") }542    .accesskey = { COPY(from_path, "restoreHTMLDefaults.accesskey") }543default-format-label =544    .label = { COPY(from_path, "defaultToParagraph.label") }545    .accesskey = { COPY(from_path, "defaultToParagraph.accesskey") }546format-description = { COPY(from_path, "sendOptionsDescription.label") }547send-options-label =548    .label = { COPY(from_path, "sendOptions.label") }549    .accesskey = { COPY(from_path, "sendOptions.accesskey") }550autocomplete-description = { COPY(from_path, "autocompleteText.label") }551ab-label =552    .label = { COPY(from_path, "addressingEnable.label") }553    .accesskey = { COPY(from_path, "addressingEnable.accesskey") }554directories-label =555    .label = { COPY(from_path, "directories.label") }556    .accesskey = { COPY(from_path, "directories.accesskey") }557directories-none-label =558    .none = { COPY(from_path, "directoriesNone.label") }559edit-directories-label =560    .label = { COPY(from_path, "editDirectories.label") }561    .accesskey = { COPY(from_path, "editDirectories.accesskey") }562email-picker-label =563    .label = { COPY(from_path, "emailCollectionPicker.label") }564    .accesskey = { COPY(from_path, "emailCollectionPicker.accesskey") }565default-directory-label =566    .value = { COPY(from_path, "showAsDefault.label") }567    .accesskey = { COPY(from_path, "showAsDefault.accesskey") }568default-last-label =569    .none = { COPY(from_path, "showAsDefaultLast.label") }570attachment-label =571    .label = { COPY(from_path, "attachmentReminder.label") }572    .accesskey = { COPY(from_path, "attachmentReminder.accesskey") }573attachment-options-label =574    .label = { COPY(from_path, "attachmentReminderOptions.label") }575    .accesskey = { COPY(from_path, "attachmentReminderOptions.accesskey") }576""",577            from_path="mail/chrome/messenger/preferences/compose.dtd",578        ),579    )580    ctx.add_transforms(581        "mail/messenger/preferences/preferences.ftl",582        "mail/messenger/preferences/preferences.ftl",583        transforms_from(584            """585enable-cloud-share =586    .label = { COPY(from_path, "enableCloudFileAccountOffer.label") }587cloud-share-size =588    .value = { COPY(from_path, "enableCloudFileAccountOffer.mb") }589add-cloud-account =590    .label = { COPY(from_path, "addCloudFileAccount1.label") }591    .accesskey = { COPY(from_path, "addCloudFileAccount1.accesskey") }592    .defaultlabel = { COPY(from_path, "addCloudFileAccount1.label") }593remove-cloud-account =594    .label = { COPY(from_path, "removeCloudFileAccount.label") }595    .accesskey = { COPY(from_path, "removeCloudFileAccount.accesskey") }596find-cloud-providers =597    .value = { COPY(from_path, "findCloudFileProviders.label") }598cloud-account-description = { COPY(from_path, "addCloudFileAccount.description") }599""",600            from_path="mail/chrome/messenger/preferences/applications.dtd",601        ),602    )603    ctx.add_transforms(604        "mail/messenger/preferences/preferences.ftl",605        "mail/messenger/preferences/preferences.ftl",606        transforms_from(607            """608mail-content = { COPY(from_path, "captionMailContent.label") }609remote-content-label =610    .label = { COPY(from_path, "acceptRemoteContent.label") }611    .accesskey = { COPY(from_path, "acceptRemoteContent.accesskey") }612exceptions-button =613    .label = { COPY(from_path, "remoteContentExceptions.label") }614    .accesskey = { COPY(from_path, "cookieExceptions.accesskey") }615remote-content-info =616    .value = { COPY(from_path, "acceptRemoteContentInfo.label") }617web-content = { COPY(from_path, "captionWebContent.label") }618history-label =619    .label = { COPY(from_path, "keepHistory.label") }620    .accesskey = { COPY(from_path, "keepHistory.accesskey") }621cookies-label =622    .label = { COPY(from_path, "acceptCookies.label") }623    .accesskey = { COPY(from_path, "acceptCookies.accesskey") }624third-party-label =625    .value = { COPY(from_path, "acceptThirdParty.pre.label") }626    .accesskey = { COPY(from_path, "acceptThirdParty.pre.accesskey") }627third-party-always =628    .label = { COPY(from_path, "acceptThirdParty.always.label") }629third-party-never =630    .label = { COPY(from_path, "acceptThirdParty.never.label") }631third-party-visited =632    .label = { COPY(from_path, "acceptThirdParty.visited.label") }633keep-label =634    .value = { COPY(from_path, "keepUntil.label") }635    .accesskey = { COPY(from_path, "keepUntil.accesskey") }636keep-expire =637    .label = { COPY(from_path, "expire.label") }638keep-ask =639    .label = { COPY(from_path, "askEachTime.label") }640cookies-button =641    .label = { COPY(from_path, "showCookies.label") }642    .accesskey = { COPY(from_path, "showCookies.accesskey") }643do-not-track-label =644    .label = { COPY(from_path, "doNotTrackCheck.label") }645    .accesskey = { COPY(from_path, "doNotTrackCheck.accesskey") }646learn-button =647    .label = { COPY(from_path, "doNotTrackLearnMore.label") }648""",649            from_path="mail/chrome/messenger/preferences/privacy.dtd",650        ),651    )652    ctx.add_transforms(653        "mail/messenger/preferences/preferences.ftl",654        "mail/messenger/preferences/preferences.ftl",655        [656            FTL.Message(657                id=FTL.Identifier("keep-close"),658                attributes=[659                    FTL.Attribute(660                        id=FTL.Identifier("label"),661                        value=REPLACE(662                            "mail/chrome/messenger/preferences/privacy.dtd",663                            "close.label",664                            {"&brandShortName;": TERM_REFERENCE("brand-short-name")},665                        ),666                    ),667                ],668            ),669        ],670    )671    ctx.add_transforms(672        "mail/messenger/preferences/preferences.ftl",673        "mail/messenger/preferences/preferences.ftl",674        transforms_from(675            """676passwords-button =677    .label = { COPY(from_path, "savedPasswords.label") }678    .accesskey = { COPY(from_path, "savedPasswords.accesskey") }679master-password-description = { COPY(from_path, "masterPassword.intro") }680master-password-label =681    .label = { COPY(from_path, "useMasterPassword.label") }682    .accesskey = { COPY(from_path, "useMasterPassword.accesskey") }683master-password-button =684    .label = { COPY(from_path, "changeMasterPassword.label") }685    .accesskey = { COPY(from_path, "changeMasterPassword.accesskey") }686junk-description = { COPY(from_path, "junkMail.intro") }687junk-label =688    .label = { COPY(from_path, "manualMark.label") }689    .accesskey = { COPY(from_path, "manualMark.accesskey") }690junk-move-label =691    .label = { COPY(from_path, "manualMarkModeMove.label") }692    .accesskey = { COPY(from_path, "manualMarkModeMove.accesskey") }693junk-delete-label =694    .label = { COPY(from_path, "manualMarkModeDelete.label") }695    .accesskey = { COPY(from_path, "manualMarkModeDelete.accesskey") }696junk-read-label =697    .label = { COPY(from_path, "markAsReadOnSpam.label") }698    .accesskey = { COPY(from_path, "markAsReadOnSpam.accesskey") }699junk-log-label =700    .label = { COPY(from_path, "enableAdaptiveJunkLogging.label") }701    .accesskey = { COPY(from_path, "enableAdaptiveJunkLogging.accesskey") }702junk-log-button =703    .label = { COPY(from_path, "openJunkLog.label") }704    .accesskey = { COPY(from_path, "openJunkLog.accesskey") }705reset-junk-button =706    .label = { COPY(from_path, "resetTrainingData.label") }707    .accesskey = { COPY(from_path, "resetTrainingData.accesskey") }708phishing-label =709    .label = { COPY(from_path, "enablePhishingDetector1.label") }710    .accesskey = { COPY(from_path, "enablePhishingDetector1.accesskey") }711antivirus-label =712    .label = { COPY(from_path, "antiVirus.label") }713    .accesskey = { COPY(from_path, "antiVirus.accesskey") }714""",715            from_path="mail/chrome/messenger/preferences/security.dtd",716        ),717    )718    ctx.add_transforms(719        "mail/messenger/preferences/preferences.ftl",720        "mail/messenger/preferences/preferences.ftl",721        [722            FTL.Message(723                id=FTL.Identifier("passwords-description"),724                value=REPLACE(725                    "mail/chrome/messenger/preferences/security.dtd",726                    "savedPasswords.intro",727                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},728                ),729            ),730            FTL.Message(731                id=FTL.Identifier("phishing-description"),732                value=REPLACE(733                    "mail/chrome/messenger/preferences/security.dtd",734                    "phishingDetector1.intro",735                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},736                ),737            ),738            FTL.Message(739                id=FTL.Identifier("antivirus-description"),740                value=REPLACE(741                    "mail/chrome/messenger/preferences/security.dtd",742                    "antiVirus.intro",743                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},744                ),745            ),746        ],747    )748    ctx.add_transforms(749        "mail/messenger/preferences/preferences.ftl",750        "mail/messenger/preferences/preferences.ftl",751        transforms_from(752            """753certificate-description = { COPY(from_path, "certSelection.description") }754certificate-auto =755    .label = { COPY(from_path, "certs.auto") }756    .accesskey = { COPY(from_path, "certs.auto.accesskey") }757certificate-ask =758    .label = { COPY(from_path, "certs.ask") }759    .accesskey = { COPY(from_path, "certs.ask.accesskey") }760ocsp-label =761    .label = { COPY(from_path, "enableOCSP.label") }762    .accesskey = { COPY(from_path, "enableOCSP.accesskey") }763certificate-button =764    .label = { COPY(from_path, "manageCertificates2.label") }765    .accesskey = { COPY(from_path, "manageCertificates2.accesskey") }766security-devices-button =767    .label = { COPY(from_path, "viewSecurityDevices2.label") }768    .accesskey = { COPY(from_path, "viewSecurityDevices2.accesskey") }769""",770            from_path="mail/chrome/messenger/preferences/advanced.dtd",771        ),772    )773    ctx.add_transforms(774        "mail/messenger/preferences/preferences.ftl",775        "mail/messenger/preferences/preferences.ftl",776        transforms_from(777            """778offline-label =779    .label = { COPY(from_path, "startupOffline.label") }780auto-connect-label =781    .label = { COPY(from_path, "startupConnectAuto.label") }782idle-label =783    .label = { COPY(from_path, "reportIdleAfter.label") }784    .accesskey = { COPY(from_path, "reportIdleAfter.accesskey") }785idle-time-label = { COPY(from_path, "idleTime") }786away-message-label =787    .label = { COPY(from_path, "andSetStatusToAway.label") }788    .accesskey = { COPY(from_path, "andSetStatusToAway.accesskey") }789send-typing-label =790    .label = { COPY(from_path, "sendTyping.label") }791    .accesskey = { COPY(from_path, "sendTyping.accesskey") }792notification-label = { COPY(from_path, "chatNotifications.label") }793show-notification-label =794    .label = { COPY(from_path, "desktopChatNotifications.label") }795    .accesskey = { COPY(from_path, "desktopChatNotifications.accesskey") }796notification-all =797    .label = { COPY(from_path, "completeNotification.label") }798notification-name =799    .label = { COPY(from_path, "buddyInfoOnly.label") }800notification-empty =801    .label = { COPY(from_path, "dummyNotification.label") }802notification-type-label =803    .label = { PLATFORM() ->804        [macos] { COPY(from_path, "getAttentionMac.label") }805        *[other] { COPY(from_path, "getAttention.label") }806    }807    .accesskey = { PLATFORM() ->808        [macos] { COPY(from_path, "getAttentionMac.accesskey") }809        *[other] { COPY(from_path, "getAttention.accesskey") }810    }811chat-play-sound-label =812    .label = { COPY(from_path, "chatSound.label") }813    .accesskey = { COPY(from_path, "chatSound.accesskey") }814chat-play-button =815    .label = { COPY(from_path, "play.label") }816    .accesskey = { COPY(from_path, "play.accesskey") }817chat-system-sound-label =818    .label = { COPY(from_path, "systemSound.label") }819    .accesskey = { COPY(from_path, "systemSound.accesskey") }820chat-custom-sound-label =821    .label = { COPY(from_path, "customsound.label") }822    .accesskey = { COPY(from_path, "customsound.accesskey") }823chat-browse-sound-button =824    .label = { COPY(from_path, "browse.label") }825    .accesskey = { COPY(from_path, "browse.accesskey") }826theme-label =827    .value = { COPY(from_path, "messageStyleTheme.label") }828    .accesskey = { COPY(from_path, "messageStyleTheme.accesskey") }829style-thunderbird =830    .label = { COPY(from_path, "messageStyleThunderbirdTheme.label") }831style-bubbles =832    .label = { COPY(from_path, "messageStyleBubblesTheme.label") }833style-dark =834    .label = { COPY(from_path, "messageStyleDarkTheme.label") }835style-paper =836    .label = { COPY(from_path, "messageStylePaperSheetsTheme.label") }837style-simple =838    .label = { COPY(from_path, "messageStyleSimpleTheme.label") }839preview-label = { COPY(from_path, "messageStylePreview.label") }840no-preview-label = { COPY(from_path, "messageStyleNoPreview.title") }841no-preview-description = { COPY(from_path, "messageStyleNoPreview.description") }842chat-variant-label =843    .value = { COPY(from_path, "messageStyleVariant.label") }844    .accesskey = { COPY(from_path, "messageStyleVariant.accesskey") }845chat-header-label =846    .label = { COPY(from_path, "messageStyleShowHeader.label") }847    .accesskey = { COPY(from_path, "messageStyleShowHeader.accesskey") }848""",849            from_path="mail/chrome/messenger/preferences/chat.dtd",850        ),851    )852    ctx.add_transforms(853        "mail/messenger/preferences/preferences.ftl",854        "mail/messenger/preferences/preferences.ftl",855        [856            FTL.Message(857                id=FTL.Identifier("startup-label"),858                attributes=[859                    FTL.Attribute(860                        id=FTL.Identifier("value"),861                        value=REPLACE(862                            "mail/chrome/messenger/preferences/chat.dtd",863                            "startupAction.label",864                            {"&brandShortName;": TERM_REFERENCE("brand-short-name")},865                        ),866                    ),867                    FTL.Attribute(868                        id=FTL.Identifier("accesskey"),869                        value=COPY(870                            "mail/chrome/messenger/preferences/chat.dtd",871                            "startupAction.accesskey",872                        ),873                    ),874                ],875            ),876        ],...bug_1615501_preferences_subdialogs.py
Source:bug_1615501_preferences_subdialogs.py  
1# Any copyright is dedicated to the Public Domain.2# http://creativecommons.org/publicdomain/zero/1.0/3from __future__ import absolute_import4import fluent.syntax.ast as FTL5from fluent.migrate.helpers import transforms_from6from fluent.migrate import CONCAT, REPLACE7from fluent.migrate.helpers import COPY, TERM_REFERENCE, MESSAGE_REFERENCE8def migrate(ctx):9    """Bug 1615501 - Fluent migration recipe for Preferences subdialogs, part {index}."""10    ctx.add_transforms(11        "mail/messenger/preferences/system-integration.ftl",12        "mail/messenger/preferences/system-integration.ftl",13        transforms_from(14            """15system-integration-title =16    .title = { COPY(from_path, "systemIntegration.title") }17system-integration-dialog =18    .buttonlabelaccept = { COPY(from_path, "acceptIntegration.label") }19    .buttonlabelcancel = { COPY(from_path, "cancelIntegration.label") }20    .buttonlabelcancel2 = { COPY(from_path, "cancelIntegration2.label") }21checkbox-email-label =22    .label = { COPY(from_path, "email.label") }23    .tooltiptext = { unset-default-tooltip }24checkbox-newsgroups-label =25    .label = { COPY(from_path, "newsgroups.label") }26    .tooltiptext = { unset-default-tooltip }27checkbox-feeds-label =28    .label = { COPY(from_path, "feeds.label") }29    .tooltiptext = { unset-default-tooltip }30system-search-engine-name = { PLATFORM() ->31    [macos] { COPY("mail/chrome/messenger/searchIntegrationMac.dtd", "searchIntegration.engineName") }32    [windows] { COPY("mail/chrome/messenger/searchIntegrationWin.dtd", "searchIntegration.engineName") }33    *[other] { COPY("mail/chrome/messenger/searchIntegrationDefault.dtd", "searchIntegration.engineName") }34}35""",36            from_path="mail/chrome/messenger/systemIntegrationDialog.dtd",37        ),38    )39    ctx.add_transforms(40        "mail/messenger/preferences/system-integration.ftl",41        "mail/messenger/preferences/system-integration.ftl",42        [43            FTL.Message(44                id=FTL.Identifier("default-client-intro"),45                value=REPLACE(46                    "mail/chrome/messenger/systemIntegrationDialog.dtd",47                    "defaultClient.intro",48                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},49                ),50            ),51            FTL.Message(52                id=FTL.Identifier("unset-default-tooltip"),53                value=REPLACE(54                    "mail/chrome/messenger/systemIntegrationDialog.dtd",55                    "unsetDefault.tooltip",56                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},57                ),58            ),59            FTL.Message(60                id=FTL.Identifier("system-search-integration-label"),61                attributes=[62                    FTL.Attribute(63                        id=FTL.Identifier("label"),64                        value=REPLACE(65                            "mail/chrome/messenger/systemIntegrationDialog.dtd",66                            "searchIntegration.label",67                            {68                                "&searchIntegration.engineName;": MESSAGE_REFERENCE(69                                    "system-search-engine-name"70                                )71                            },72                        ),73                    ),74                    FTL.Attribute(75                        id=FTL.Identifier("accesskey"),76                        value=COPY(77                            "mail/chrome/messenger/systemIntegrationDialog.dtd",78                            "searchIntegration.accesskey",79                        ),80                    ),81                ],82            ),83            FTL.Message(84                id=FTL.Identifier("check-on-startup-label"),85                attributes=[86                    FTL.Attribute(87                        id=FTL.Identifier("label"),88                        value=REPLACE(89                            "mail/chrome/messenger/systemIntegrationDialog.dtd",90                            "checkOnStartup.label",91                            {"&brandShortName;": TERM_REFERENCE("brand-short-name")},92                        ),93                    ),94                    FTL.Attribute(95                        id=FTL.Identifier("accesskey"),96                        value=COPY(97                            "mail/chrome/messenger/systemIntegrationDialog.dtd",98                            "checkOnStartup.accesskey",99                        ),100                    ),101                ],102            ),103        ],104    )105    ctx.add_transforms(106        "mail/messenger/preferences/fonts.ftl",107        "mail/messenger/preferences/fonts.ftl",108        transforms_from(109            """110fonts-encoding-dialog-title =111    .title = { COPY(from_path, "fontsAndEncodingsDialog.title") }112fonts-language-legend =113    .value = { COPY(from_path, "language.label") }114    .accesskey = { COPY(from_path, "language.accesskey") }115fonts-proportional-label =116    .value = { COPY(from_path, "proportional.label") }117    .accesskey = { COPY(from_path, "proportional.accesskey") }118font-language-group-latin =119    .label = { COPY(from_path, "font.langGroup.latin") }120font-language-group-japanese =121    .label = { COPY(from_path, "font.langGroup.japanese") }122font-language-group-trad-chinese =123    .label = { COPY(from_path, "font.langGroup.trad-chinese") }124font-language-group-simpl-chinese =125    .label = { COPY(from_path, "font.langGroup.simpl-chinese") }126font-language-group-trad-chinese-hk =127    .label = { COPY(from_path, "font.langGroup.trad-chinese-hk") }128font-language-group-korean =129    .label = { COPY(from_path, "font.langGroup.korean") }130font-language-group-cyrillic =131    .label = { COPY(from_path, "font.langGroup.cyrillic") }132font-language-group-el =133    .label = { COPY(from_path, "font.langGroup.el") }134font-language-group-other =135    .label = { COPY(from_path, "font.langGroup.other") }136font-language-group-thai =137    .label = { COPY(from_path, "font.langGroup.thai") }138font-language-group-hebrew =139    .label = { COPY(from_path, "font.langGroup.hebrew") }140font-language-group-arabic =141    .label = { COPY(from_path, "font.langGroup.arabic") }142font-language-group-devanagari =143    .label = { COPY(from_path, "font.langGroup.devanagari") }144font-language-group-tamil =145    .label = { COPY(from_path, "font.langGroup.tamil") }146font-language-group-armenian =147    .label = { COPY(from_path, "font.langGroup.armenian") }148font-language-group-bengali =149    .label = { COPY(from_path, "font.langGroup.bengali") }150font-language-group-canadian =151    .label = { COPY(from_path, "font.langGroup.canadian") }152font-language-group-ethiopic =153    .label = { COPY(from_path, "font.langGroup.ethiopic") }154font-language-group-georgian =155    .label = { COPY(from_path, "font.langGroup.georgian") }156font-language-group-gujarati =157    .label = { COPY(from_path, "font.langGroup.gujarati") }158font-language-group-gurmukhi =159    .label = { COPY(from_path, "font.langGroup.gurmukhi") }160font-language-group-khmer =161    .label = { COPY(from_path, "font.langGroup.khmer") }162font-language-group-malayalam =163    .label = { COPY(from_path, "font.langGroup.malayalam") }164font-language-group-math =165    .label = { COPY(from_path, "font.langGroup.math") }166font-language-group-odia =167    .label = { COPY(from_path, "font.langGroup.odia") }168font-language-group-telugu =169    .label = { COPY(from_path, "font.langGroup.telugu") }170font-language-group-kannada =171    .label = { COPY(from_path, "font.langGroup.kannada") }172font-language-group-sinhala =173    .label = { COPY(from_path, "font.langGroup.sinhala") }174font-language-group-tibetan =175    .label = { COPY(from_path, "font.langGroup.tibetan") }176default-font-serif =177    .label = { COPY(from_path, "useDefaultFontSerif.label") }178default-font-sans-serif =179    .label = { COPY(from_path, "useDefaultFontSansSerif.label") }180font-size-label =181    .value = { COPY(from_path, "size.label") }182    .accesskey = { COPY(from_path, "sizeProportional.accesskey") }183font-size-monospace-label =184    .value = { COPY(from_path, "size.label") }185    .accesskey = { COPY(from_path, "sizeMonospace.accesskey") }186font-serif-label =187    .value = { COPY(from_path, "serif.label") }188    .accesskey = { COPY(from_path, "serif.accesskey") }189font-sans-serif-label =190    .value = { COPY(from_path, "sans-serif.label") }191    .accesskey = { COPY(from_path, "sans-serif.accesskey") }192font-monospace-label =193    .value = { COPY(from_path, "monospace.label") }194    .accesskey = { COPY(from_path, "monospace.accesskey") }195font-min-size-label =196    .value = { COPY(from_path, "minSize.label") }197    .accesskey = { COPY(from_path, "minSize.accesskey") }198min-size-none =199    .label = { COPY(from_path, "minSize.none") }200font-control-legend = { COPY(from_path, "fontControl.label") }201use-document-fonts-checkbox =202    .label = { COPY(from_path, "useDocumentFonts.label") }203    .accesskey = { COPY(from_path, "useDocumentFonts.accesskey") }204use-fixed-width-plain-checkbox =205    .label = { COPY(from_path, "useFixedWidthForPlainText.label") }206    .accesskey = { COPY(from_path, "fixedWidth.accesskey") }207text-encoding-legend = { COPY(from_path, "languagesTitle2.label") }208text-encoding-description = { COPY(from_path, "composingDescription2.label") }209font-outgoing-email-label =210    .value = { COPY(from_path, "sendDefaultCharset.label") }211    .accesskey = { COPY(from_path, "sendDefaultCharset.accesskey") }212font-incoming-email-label =213    .value = { COPY(from_path, "viewDefaultCharsetList.label") }214    .accesskey = { COPY(from_path, "viewDefaultCharsetList.accesskey") }215default-font-reply-checkbox =216    .label = { COPY(from_path, "replyInDefaultCharset3.label") }217    .accesskey = { COPY(from_path, "replyInDefaultCharset3.accesskey") }218""",219            from_path="mail/chrome/messenger/preferences/fonts.dtd",220        ),221    )222    ctx.add_transforms(223        "mail/messenger/preferences/colors.ftl",224        "mail/messenger/preferences/colors.ftl",225        transforms_from(226            """227colors-dialog-window =228    .title = { COPY(from_path, "colorsDialog.title") }229    .style = { PLATFORM() ->230        [macos] width: { COPY(from_path, "window.macWidth") } !important231        *[other] width: { COPY(from_path, "window.width") } !important232    }233colors-dialog-legend = { COPY(from_path, "color") }234text-color-label =235    .value = { COPY(from_path, "textColor.label") }236    .accesskey = { COPY(from_path, "textColor.accesskey") }237background-color-label =238    .value = { COPY(from_path, "backgroundColor.label") }239    .accesskey = { COPY(from_path, "backgroundColor.accesskey") }240use-system-colors =241    .label = { COPY(from_path, "useSystemColors.label") }242    .accesskey = { COPY(from_path, "useSystemColors.accesskey") }243colors-link-legend = { COPY(from_path, "links") }244link-color-label =245    .value = { COPY(from_path, "linkColor.label") }246    .accesskey = { COPY(from_path, "linkColor.accesskey") }247visited-link-color-label =248    .value = { COPY(from_path, "visitedLinkColor.label") }249    .accesskey = { COPY(from_path, "visitedLinkColor.accesskey") }250underline-link-checkbox =251    .label = { COPY(from_path, "underlineLinks.label") }252    .accesskey = { COPY(from_path, "underlineLinks.accesskey") }253override-color-label =254    .value = { COPY(from_path, "overridePageColors.label") }255    .accesskey = { COPY(from_path, "overridePageColors.accesskey") }256override-color-always =257    .label = { COPY(from_path, "overridePageColors.always.label") }258override-color-auto =259    .label = { COPY(from_path, "overridePageColors.auto.label") }260override-color-never =261    .label = { COPY(from_path, "overridePageColors.never.label") }262""",263            from_path="mail/chrome/messenger/preferences/colors.dtd",264        ),265    )266    ctx.add_transforms(267        "mail/messenger/preferences/notifications.ftl",268        "mail/messenger/preferences/notifications.ftl",269        transforms_from(270            """271notifications-dialog-window =272    .title = { COPY(from_path, "notificationsDialog2.title") }273customize-alert-description = { COPY(from_path, "alertCustomization.intro") }274preview-text-checkbox =275    .label = { COPY(from_path, "previewText.label") }276    .accesskey = { COPY(from_path, "previewText.accesskey") }277subject-checkbox =278    .label = { COPY(from_path, "subject.label") }279    .accesskey = { COPY(from_path, "subject.accesskey") }280sender-checkbox =281    .label = { COPY(from_path, "sender.label") }282    .accesskey = { COPY(from_path, "sender.accesskey") }283open-time-label-before =284    .value = { COPY(from_path, "totalOpenTimeBefore.label") }285    .accesskey = { COPY(from_path, "totalOpenTimeBefore.accesskey") }286open-time-label-after =287    .value = { COPY(from_path, "totalOpenTimeEnd.label") }288""",289            from_path="mail/chrome/messenger/preferences/notifications.dtd",290        ),291    )292    ctx.add_transforms(293        "mail/messenger/preferences/new-tag.ftl",294        "mail/messenger/preferences/new-tag.ftl",295        transforms_from(296            """297tag-dialog-window =298    .title = { COPY(from_path, "newTagDialog1.title") }299tag-name-label =300    .value = { COPY(from_path, "name.label") }301    .accesskey = { COPY(from_path, "name.accesskey") }302""",303            from_path="mail/chrome/messenger/newTagDialog.dtd",304        ),305    )306    ctx.add_transforms(307        "mail/messenger/preferences/receipts.ftl",308        "mail/messenger/preferences/receipts.ftl",309        transforms_from(310            """311receipts-dialog-window =312    .title = { COPY(from_path, "dialog.title") }313return-receipt-checkbox-control =314    .label = { COPY(from_path, "requestReceipt.label") }315    .acceskey = { COPY(from_path, "requestReceipt.accesskey") }316receipt-arrive-label = { COPY(from_path, "receiptArrive.label") }317receipt-leave-radio-control =318    .label = { COPY(from_path, "leaveIt.label") }319    .acceskey = { COPY(from_path, "leaveIt.accesskey") }320receipt-move-radio-control =321    .label = { COPY(from_path, "moveToSent.label") }322    .acceskey = { COPY(from_path, "moveToSent.accesskey") }323receipt-request-label = { COPY(from_path, "requestMDN.label") }324receipt-return-never-radio-control =325    .label = { COPY(from_path, "never.label") }326    .acceskey = { COPY(from_path, "never.accesskey") }327receipt-return-some-radio-control =328    .label = { COPY(from_path, "returnSome.label") }329    .acceskey = { COPY(from_path, "returnSome.accesskey") }330receipt-not-to-cc-label =331    .value = { COPY(from_path, "notInToCc.label") }332    .acceskey = { COPY(from_path, "notInToCc.accesskey") }333receipt-send-never-label =334    .label = { COPY(from_path, "neverSend.label") }335receipt-send-always-label =336    .label = { COPY(from_path, "alwaysSend.label") }337receipt-send-ask-label =338    .label = { COPY(from_path, "askMe.label") }339sender-outside-domain-label =340    .value = { COPY(from_path, "outsideDomain.label") }341    .acceskey = { COPY(from_path, "outsideDomain.accesskey") }342other-cases-text-label =343    .value = { COPY(from_path, "otherCases.label") }344    .acceskey = { COPY(from_path, "otherCases.accesskey") }345""",346            from_path="mail/chrome/messenger/preferences/receipts.dtd",347        ),348    )349    ctx.add_transforms(350        "mail/messenger/preferences/connection.ftl",351        "mail/messenger/preferences/connection.ftl",352        transforms_from(353            """354connection-dialog-window =355    .title = { COPY(from_path, "connectionsDialog.title") }356    .style = { PLATFORM() ->357        [macos] width: { COPY(from_path, "window.macWidth") } !important358        *[other] width: { COPY(from_path, "window.width") } !important359    }360connection-proxy-legend = { COPY(from_path, "proxyTitle.label") }361proxy-type-no =362    .label = { COPY(from_path, "noProxyTypeRadio.label") }363    .accesskey = { COPY(from_path, "noProxyTypeRadio.accesskey") }364proxy-type-wpad =365    .label = { COPY(from_path, "WPADTypeRadio.label") }366    .accesskey = { COPY(from_path, "WPADTypeRadio.accesskey") }367proxy-type-system =368    .label = { COPY(from_path, "systemTypeRadio.label") }369    .accesskey = { COPY(from_path, "systemTypeRadio.accesskey") }370proxy-type-manual =371    .label = { COPY(from_path, "manualTypeRadio.label") }372    .accesskey = { COPY(from_path, "manualTypeRadio.accesskey") }373proxy-http-label =374    .value = { COPY(from_path, "http.label") }375    .accesskey = { COPY(from_path, "http.accesskey") }376http-port-label =377    .value = { COPY(from_path, "HTTPport.label") }378    .accesskey = { COPY(from_path, "HTTPport.accesskey") }379proxy-http-sharing =380    .label = { COPY(from_path, "proxyHttpSharing.label") }381    .accesskey = { COPY(from_path, "proxyHttpSharing.accesskey") }382proxy-https-label =383    .value = { COPY(from_path, "https.label") }384    .accesskey = { COPY(from_path, "https.accesskey") }385ssl-port-label =386    .value = { COPY(from_path, "SSLport.label") }387    .accesskey = { COPY(from_path, "SSLport.accesskey") }388proxy-socks-label =389    .value = { COPY(from_path, "socks.label") }390    .accesskey = { COPY(from_path, "socks.accesskey") }391socks-port-label =392    .value = { COPY(from_path, "SOCKSport.label") }393    .accesskey = { COPY(from_path, "SOCKSport.accesskey") }394proxy-socks4-label =395    .label = { COPY(from_path, "socks4.label") }396    .accesskey = { COPY(from_path, "socks4.accesskey") }397proxy-socks5-label =398    .label = { COPY(from_path, "socks5.label") }399    .accesskey = { COPY(from_path, "socks5.accesskey") }400proxy-type-auto =401    .label = { COPY(from_path, "autoTypeRadio.label") }402    .accesskey = { COPY(from_path, "autoTypeRadio.accesskey") }403proxy-reload-label =404    .label = { COPY(from_path, "reload.label") }405    .accesskey = { COPY(from_path, "reload.accesskey") }406no-proxy-label =407    .value = { COPY(from_path, "noproxy.label") }408    .accesskey = { COPY(from_path, "noproxy.accesskey") }409no-proxy-example = { COPY(from_path, "noproxyExplain.label") }410no-proxy-localhost-label = { COPY(from_path, "noproxyLocalhostDesc.label") }411proxy-password-prompt =412    .label = { COPY(from_path, "autologinproxy.label") }413    .accesskey = { COPY(from_path, "autologinproxy.accesskey") }414    .tooltiptext = { COPY(from_path, "autologinproxy.tooltip") }415proxy-remote-dns =416    .label = { COPY(from_path, "socksRemoteDNS.label") }417    .accesskey = { COPY(from_path, "socksRemoteDNS.accesskey") }418proxy-enable-doh =419    .label = { COPY(from_path, "dnsOverHttps.label") }420    .accesskey = { COPY(from_path, "dnsOverHttps.accesskey") }421""",422            from_path="mail/chrome/messenger/preferences/connection.dtd",423        ),424    )425    ctx.add_transforms(426        "mail/messenger/preferences/offline.ftl",427        "mail/messenger/preferences/offline.ftl",428        transforms_from(429            """430offline-dialog-window =431    .title = { COPY(from_path, "offlineDialog.title") }432autodetect-online-label =433    .label = { COPY(from_path, "checkAutoDetect.label") }434    .accesskey = { COPY(from_path, "checkAutoDetect.accesskey") }435startup-label = { COPY(from_path, "titleStartUp") }436status-radio-remember =437    .label = { COPY(from_path, "radioRememberPrevState.label") }438    .accesskey = { COPY(from_path, "radioRememberPrevState.accesskey") }439status-radio-ask =440    .label = { COPY(from_path, "radioAskState.label") }441    .accesskey = { COPY(from_path, "radioAskState.accesskey") }442status-radio-always-online =443    .label = { COPY(from_path, "radioAlwaysOnlineState.label") }444    .accesskey = { COPY(from_path, "radioAlwaysOnlineState.accesskey") }445status-radio-always-offline =446    .label = { COPY(from_path, "radioAlwaysOffline.label") }447    .accesskey = { COPY(from_path, "radioAlwaysOffline.accesskey") }448going-online-label = { COPY(from_path, "textGoingOnline") }449going-online-auto =450    .label = { COPY(from_path, "radioAutoSend.label") }451    .accesskey = { COPY(from_path, "radioAutoSend.accesskey") }452going-online-not =453    .label = { COPY(from_path, "radioNotSend.label") }454    .accesskey = { COPY(from_path, "radioNotSend.accesskey") }455going-online-ask =456    .label = { COPY(from_path, "radioAskUnsent.label") }457    .accesskey = { COPY(from_path, "radioAskUnsent.accesskey") }458going-offline-label = { COPY(from_path, "textGoingOffline") }459going-offline-auto =460    .label = { COPY(from_path, "radioAutoDownload.label") }461    .accesskey = { COPY(from_path, "radioAutoDownload.accesskey") }462going-offline-not =463    .label = { COPY(from_path, "radioNotDownload.label") }464    .accesskey = { COPY(from_path, "radioNotDownload.accesskey") }465going-offline-ask =466    .label = { COPY(from_path, "radioAskDownload.label") }467    .accesskey = { COPY(from_path, "radioAskDownload.accesskey") }468""",469            from_path="mail/chrome/messenger/preferences/offline.dtd",470        ),471    )472    ctx.add_transforms(473        "mail/messenger/preferences/sendoptions.ftl",474        "mail/messenger/preferences/sendoptions.ftl",475        transforms_from(476            """477sendoptions-dialog-window =478    .title = { COPY(from_path, "dialog.title") }479send-mail-title = { COPY(from_path, "sendMail.title") }480auto-downgrade-label =481    .label = { COPY(from_path, "autoDowngrade.label") }482    .accesskey = { COPY(from_path, "autoDowngrade.accesskey") }483default-html-format-label = { COPY(from_path, "sendMaildesc.label") }484html-format-ask =485    .label = { COPY(from_path, "askMe.label") }486    .accesskey = { COPY(from_path, "askMe.accesskey") }487html-format-convert =488    .label = { COPY(from_path, "convertPlain.label") }489    .accesskey = { COPY(from_path, "convertPlain.accesskey") }490html-format-send-html =491    .label = { COPY(from_path, "sendHTML.label") }492    .accesskey = { COPY(from_path, "sendHTML.accesskey") }493html-format-send-both =494    .label = { COPY(from_path, "sendBoth.label") }495    .accesskey = { COPY(from_path, "sendBoth.accesskey") }496default-html-format-info = { COPY(from_path, "override.label") }497html-tab-label =498    .label = { COPY(from_path, "HTMLTab.label") }499    .accesskey = { COPY(from_path, "HTMLTab.accesskey") }500plain-tab-label =501    .label = { COPY(from_path, "PlainTextTab.label") }502    .accesskey = { COPY(from_path, "PlainTextTab.accesskey") }503add-domain-button =504    .label = { COPY(from_path, "AddHtmlDomain.label") }505    .accesskey = { COPY(from_path, "AddHtmlDomain.accesskey") }506delete-domain-button =507    .label = { COPY(from_path, "DeleteHtmlDomain.label") }508    .accesskey = { COPY(from_path, "DeleteHtmlDomain.accesskey") }509""",510            from_path="mail/chrome/messenger/preferences/sendoptions.dtd",511        ),512    )513    ctx.add_transforms(514        "mail/messenger/preferences/sendoptions.ftl",515        "mail/messenger/preferences/sendoptions.ftl",516        [517            FTL.Message(518                id=FTL.Identifier("send-message-domain-label"),519                value=REPLACE(520                    "mail/chrome/messenger/preferences/sendoptions.dtd",521                    "domaindesc.label",522                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},523                ),524            ),525        ],526    )527    ctx.add_transforms(528        "mail/messenger/preferences/attachment-reminder.ftl",529        "mail/messenger/preferences/attachment-reminder.ftl",530        transforms_from(531            """532attachment-reminder-window =533    .title = { COPY(from_path, "attachmentReminderDialog.title") }534keyword-new-button =535    .label = { COPY(from_path, "newKeywordButton.label") }536    .accesskey = { COPY(from_path, "newKeywordButton.accesskey") }537keyword-edit-button =538    .label = { COPY(from_path, "editKeywordButton1.label") }539    .accesskey = { COPY(from_path, "editKeywordButton1.accesskey") }540keyword-remove-button =541    .label = { COPY(from_path, "removeKeywordButton.label") }542    .accesskey = { COPY(from_path, "removeKeywordButton.accesskey") }543""",544            from_path="mail/chrome/messenger/preferences/attachmentReminder.dtd",545        ),546    )547    ctx.add_transforms(548        "mail/messenger/preferences/attachment-reminder.ftl",549        "mail/messenger/preferences/attachment-reminder.ftl",550        [551            FTL.Message(552                id=FTL.Identifier("attachment-reminder-label"),553                value=REPLACE(554                    "mail/chrome/messenger/preferences/attachmentReminder.dtd",555                    "attachKeywordText.label",556                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},557                ),558            ),559        ],560    )561    ctx.add_transforms(562        "mail/messenger/preferences/attachment-reminder.ftl",563        "mail/messenger/preferences/attachment-reminder.ftl",564        transforms_from(565            """566new-keyword-title = { COPY(from_path, "attachmentReminderNewDialogTitle") }567new-keyword-label = { COPY(from_path, "attachmentReminderNewText") }568edit-keyword-title = { COPY(from_path, "attachmentReminderEditDialogTitle") }569edit-keyword-label = { COPY(from_path, "attachmentReminderEditText") }570""",571            from_path="mail/chrome/messenger/preferences/preferences.properties",572        ),573    )574    ctx.add_transforms(575        "mail/messenger/preferences/permissions.ftl",576        "mail/messenger/preferences/permissions.ftl",577        transforms_from(578            """579permissions-reminder-window =580    .title = { COPY(from_path, "window.title") }581    .style = width: { COPY(from_path, "window.width") };582window-close-key =583    .key = { COPY(from_path, "windowClose.key") }584website-address-label =585    .value = { COPY(from_path, "address.label") }586    .accesskey = { COPY(from_path, "address.accesskey") }587block-button =588    .label = { COPY(from_path, "block.label") }589    .accesskey = { COPY(from_path, "block.accesskey") }590allow-session-button =591    .label = { COPY(from_path, "session.label") }592    .accesskey = { COPY(from_path, "session.accesskey") }593allow-button =594    .label = { COPY(from_path, "allow.label") }595    .accesskey = { COPY(from_path, "allow.accesskey") }596treehead-sitename-label =597    .label = { COPY(from_path, "treehead.sitename.label") }598treehead-status-label =599    .label = { COPY(from_path, "treehead.status.label") }600remove-site-button =601    .label = { COPY(from_path, "removepermission.label") }602    .accesskey = { COPY(from_path, "removepermission.accesskey") }603remove-all-site-button =604    .label = { COPY(from_path, "removeallpermissions.label") }605    .accesskey = { COPY(from_path, "removeallpermissions.accesskey") }606cancel-button =607    .label = { COPY(from_path, "button.cancel.label") }608    .accesskey = { COPY(from_path, "button.cancel.accesskey") }609save-button =610    .label = { COPY(from_path, "button.ok.label") }611    .accesskey = { COPY(from_path, "button.ok.accesskey") }612""",613            from_path="mail/chrome/messenger/preferences/permissions.dtd",614        ),615    )616    ctx.add_transforms(617        "mail/messenger/preferences/permissions.ftl",618        "mail/messenger/preferences/permissions.ftl",619        transforms_from(620            """621permission-can-label = { COPY(from_path, "can") }622permission-can-access-first-party-label = { COPY(from_path, "canAccessFirstParty") }623permission-can-session-label = { COPY(from_path, "canSession") }624permission-cannot-label = { COPY(from_path, "cannot") }625invalid-uri-message = { COPY(from_path, "invalidURI") }626invalid-uri-title = { COPY(from_path, "invalidURITitle") }627""",628            from_path="mail/chrome/messenger/preferences/preferences.properties",629        ),630    )631    ctx.add_transforms(632        "mail/messenger/preferences/cookies.ftl",633        "mail/messenger/preferences/cookies.ftl",634        transforms_from(635            """636cookies-window-dialog =637    .title = { COPY(from_path, "window.title") }638    .style = width: { COPY(from_path, "window.width") };639window-close-key =640    .key = { COPY(from_path, "windowClose.key") }641window-focus-search-key =642    .key = { COPY(from_path, "focusSearch1.key") }643window-focus-search-alt-key =644    .key = { COPY(from_path, "focusSearch2.key") }645filter-search-label =646    .value = { COPY(from_path, "filter.label") }647    .accesskey = { COPY(from_path, "filter.accesskey") }648cookies-on-system-label = { COPY(from_path, "cookiesonsystem.label") }649treecol-site-header =650    .label = { COPY(from_path, "cookiedomain.label") }651treecol-name-header =652    .label = { COPY(from_path, "cookiename.label") }653props-name-label =654    .value = { COPY(from_path, "props.name.label") }655props-value-label =656    .value = { COPY(from_path, "props.value.label") }657props-domain-label =658    .value = { COPY(from_path, "props.domain.label") }659props-path-label =660    .value = { COPY(from_path, "props.path.label") }661props-secure-label =662    .value = { COPY(from_path, "props.secure.label") }663props-expires-label =664    .value = { COPY(from_path, "props.expires.label") }665props-container-label =666    .value = { COPY(from_path, "props.container.label") }667remove-cookie-button =668    .label = { COPY(from_path, "button.removecookie.label") }669    .accesskey = { COPY(from_path, "button.removecookie.accesskey") }670remove-all-cookies-button =671    .label = { COPY(from_path, "button.removeallcookies.label") }672    .accesskey = { COPY(from_path, "button.removeallcookies.accesskey") }673cookie-close-button =674    .label = { COPY(from_path, "button.close.label") }675    .accesskey = { COPY(from_path, "button.close.accesskey") }676""",677            from_path="mail/chrome/messenger/preferences/cookies.dtd",678        ),679    )680    ctx.add_transforms(681        "mail/messenger/preferences/dock-options.ftl",682        "mail/messenger/preferences/dock-options.ftl",683        transforms_from(684            """685dock-options-window-dialog =686    .title = { COPY(from_path, "dockOptionsDialog.title") }687    .style = width: { COPY(from_path, "window.macWidth") };688bounce-system-dock-icon =689    .label = { COPY(from_path, "bounceSystemDockIcon.label") }690    .accesskey = { COPY(from_path, "bounceSystemDockIcon.accesskey") }691dock-icon-legend = { COPY(from_path, "dockIconBadge.label") }692dock-icon-show-label =693    .value = { COPY(from_path, "dockIconShow.label") }694count-unread-messages-radio =695    .label = { COPY(from_path, "showAllUnreadMessagesCount.label") }696    .accesskey = { COPY(from_path, "showAllUnreadMessagesCount.accesskey") }697count-new-messages-radio =698    .label = { COPY(from_path, "newMessagesCountDock.label") }699    .accesskey = { COPY(from_path, "newMessagesCountDock.accesskey") }700notification-settings-info = { COPY(from_path, "directNotificationSettings.label") }701""",702            from_path="mail/chrome/messenger/preferences/dockoptions.dtd",703        ),704    )705    ctx.add_transforms(706        "mail/messenger/preferences/application-manager.ftl",707        "mail/messenger/preferences/application-manager.ftl",708        transforms_from(709            """710app-manager-window-dialog =711    .title = { COPY(from_path, "appManager.title") }712    .style = { COPY(from_path, "appManager.style") }713remove-app-button =714    .label = { COPY(from_path, "remove.label") }715    .accesskey = { COPY(from_path, "remove.accesskey") }716""",717            from_path="mail/chrome/messenger/preferences/applicationManager.dtd",718        ),...bug_1615501_preferences_calendar.py
Source:bug_1615501_preferences_calendar.py  
1# Any copyright is dedicated to the Public Domain.2# http://creativecommons.org/publicdomain/zero/1.0/3from __future__ import absolute_import4import fluent.syntax.ast as FTL5from fluent.migrate.helpers import transforms_from6from fluent.migrate import CONCAT, REPLACE7from fluent.migrate.helpers import COPY, TERM_REFERENCE8def migrate(ctx):9    """Bug 1615501 - Fluent migration recipe for Preferences Calendar Tab, part {index}."""10    ctx.add_transforms(11        "calendar/calendar/preferences.ftl",12        "calendar/calendar/preferences.ftl",13        transforms_from(14            """15calendar-title = { COPY(from_path, "panelHeader.title") }16calendar-title-reminder = { COPY(from_path, "panelReminder.title") }17calendar-title-category = { COPY(from_path, "panelCategory.title") }18""",19            from_path="calendar/chrome/calendar/preferences/preferences.dtd",20        ),21    )22    ctx.add_transforms(23        "calendar/calendar/preferences.ftl",24        "calendar/calendar/preferences.ftl",25        transforms_from(26            """27dateformat-label =28    .value = { COPY(from_path, "pref.dateformat.label") }29    .accesskey = { COPY(from_path, "pref.dateformat.accesskey") }30#   $date (String) - the formatted example date31dateformat-long =32    .label = { COPY(from_path, "pref.dateformat.long") }: { $date }33#   $date (String) - the formatted example date34dateformat-short =35    .label = { COPY(from_path, "pref.dateformat.short") }: { $date }36timezone-label =37    .value = { COPY(from_path, "pref.timezones.caption") }:38todaypane-legend = { COPY(from_path, "pref.calendar.todaypane.agenda.caption") }39soon-label =40    .value = { COPY(from_path, "pref.soondays2.label") }41    .accesskey = { COPY(from_path, "pref.soondays2.accesskey") }42event-task-legend = { COPY(from_path, "pref.eventsandtasks.label") }43default-length-label =44    .value = { COPY(from_path, "pref.default_event_task_length.label") }:45    .accesskey = { COPY(from_path, "pref.default_event_task_length.accesskey") }46task-start-1-label =47    .label = { COPY(from_path, "pref.default_task_none.label") }48task-start-2-label =49    .label = { COPY(from_path, "pref.default_task_start_of_day.label") }50task-start-3-label =51    .label = { COPY(from_path, "pref.default_task_end_of_day.label") }52task-start-4-label =53    .label = { COPY(from_path, "pref.default_task_tomorrow.label") }54task-start-5-label =55    .label = { COPY(from_path, "pref.default_task_next_week.label") }56task-start-6-label =57    .label = { COPY(from_path, "pref.default_task_offset_current.label") }58task-start-7-label =59    .label = { COPY(from_path, "pref.default_task_offset_start.label") }60task-start-8-label =61    .label = { COPY(from_path, "pref.default_task_offset_next_hour.label") }62edit-intab-label =63    .label = { COPY(from_path, "pref.editInTab.label") }64    .accesskey = { COPY(from_path, "pref.editInTab.accesskey") }65accessibility-legend = { COPY(from_path, "pref.accessibility.label") }66accessibility-colors-label =67    .label = { COPY(from_path, "pref.systemcolors.label") }68    .accesskey = { COPY(from_path, "pref.systemcolors.accesskey") }69""",70            from_path="calendar/chrome/calendar/preferences/general.dtd",71        ),72    )73    ctx.add_transforms(74        "calendar/calendar/preferences.ftl",75        "calendar/calendar/preferences.ftl",76        transforms_from(77            """78weekstart-label =79    .value = { COPY(from_path, "pref.weekstarts.label") }80    .accesskey = { COPY(from_path, "pref.weekstarts.accesskey") }81show-weeknumber-label =82    .label = { COPY(from_path, "pref.calendar.view-minimonth.showweeknumber.label") }83    .accesskey = { COPY(from_path, "pref.calendar.view-minimonth.showweeknumber.accesskey") }84workdays-label =85    .value = { COPY(from_path, "pref.workweekDays.label") }86dayweek-legend = { COPY(from_path, "pref.calendar.view.dayandweekviews.caption") }87visible-hours-label =88    .value = { COPY(from_path, "pref.calendar.view.visiblehours.label") }89    .accesskey = { COPY(from_path, "pref.calendar.view.visiblehours.accesskey") }90visible-hours-end-label =91    .value = { COPY(from_path, "pref.calendar.view.visiblehoursend.label") }92day-start-label =93    .value = { COPY(from_path, "pref.calendar.view.daystart.label") }94    .accesskey = { COPY(from_path, "pref.calendar.view.daystart.accesskey") }95day-end-label =96    .value = { COPY(from_path, "pref.calendar.view.dayend.label") }97    .accesskey = { COPY(from_path, "pref.calendar.view.dayend.accesskey") }98location-checkbox =99    .label = { COPY(from_path, "pref.showlocation.label") }100    .accesskey = { COPY(from_path, "pref.showlocation.accesskey") }101multiweek-legend = { COPY(from_path, "pref.calendar.view.multiweekview.caption") }102number-of-weeks-label =103    .value = { COPY(from_path, "pref.numberofweeks.label") }104    .accesskey = { COPY(from_path, "pref.numberofweeks.accesskey") }105week-0-label =106    .label = { COPY(from_path, "pref.numberofweeks.0") }107week-1-label =108    .label = { COPY(from_path, "pref.numberofweeks.1") }109week-2-label =110    .label = { COPY(from_path, "pref.numberofweeks.2") }111week-3-label =112    .label = { COPY(from_path, "pref.numberofweeks.3") }113week-4-label =114    .label = { COPY(from_path, "pref.numberofweeks.4") }115week-5-label =116    .label = { COPY(from_path, "pref.numberofweeks.5") }117week-6-label =118    .label = { COPY(from_path, "pref.numberofweeks.6") }119previous-weeks-label =120    .value = { COPY(from_path, "pref.numberofpreviousweeks.label") }121    .accesskey = { COPY(from_path, "pref.numberofpreviousweeks.accesskey") }122""",123            from_path="calendar/chrome/calendar/preferences/views.dtd",124        ),125    )126    ctx.add_transforms(127        "calendar/calendar/preferences.ftl",128        "calendar/calendar/preferences.ftl",129        transforms_from(130            """131day-1-name =132    .label = { COPY(from_path, "day.1.name") }133day-2-name =134    .label = { COPY(from_path, "day.2.name") }135day-3-name =136    .label = { COPY(from_path, "day.3.name") }137day-4-name =138    .label = { COPY(from_path, "day.4.name") }139day-5-name =140    .label = { COPY(from_path, "day.5.name") }141day-6-name =142    .label = { COPY(from_path, "day.6.name") }143day-7-name =144    .label = { COPY(from_path, "day.7.name") }145day-1-checkbox =146    .label = { COPY(from_path, "day.1.Ddd") }147    .accesskey = { COPY(from_path, "day.1.Ddd.accesskey") }148day-2-checkbox =149    .label = { COPY(from_path, "day.2.Ddd") }150    .accesskey = { COPY(from_path, "day.2.Ddd.accesskey") }151day-3-checkbox =152    .label = { COPY(from_path, "day.3.Ddd") }153    .accesskey = { COPY(from_path, "day.3.Ddd.accesskey") }154day-4-checkbox =155    .label = { COPY(from_path, "day.4.Ddd") }156    .accesskey = { COPY(from_path, "day.4.Ddd.accesskey") }157day-5-checkbox =158    .label = { COPY(from_path, "day.5.Ddd") }159    .accesskey = { COPY(from_path, "day.5.Ddd.accesskey") }160day-6-checkbox =161    .label = { COPY(from_path, "day.6.Ddd") }162    .accesskey = { COPY(from_path, "day.6.Ddd.accesskey") }163day-7-checkbox =164    .label = { COPY(from_path, "day.7.Ddd") }165    .accesskey = { COPY(from_path, "day.7.Ddd.accesskey") }166midnight-label =167    .label = { COPY(from_path, "time.midnight") }168noon-label =169    .label = { COPY(from_path, "time.noon") }170""",171            from_path="calendar/chrome/calendar/global.dtd",172        ),173    )174    ctx.add_transforms(175        "calendar/calendar/preferences.ftl",176        "calendar/calendar/preferences.ftl",177        transforms_from(178            """179task-start-label =180    .value = { COPY(from_path, "read.only.task.start.label") }181task-due-label =182    .value = { COPY(from_path, "read.only.task.due.label") }183""",184            from_path="calendar/chrome/calendar/calendar-event-dialog.dtd",185        ),186    )187    ctx.add_transforms(188        "calendar/calendar/preferences.ftl",189        "calendar/calendar/preferences.ftl",190        transforms_from(191            """192reminder-legend = { COPY(from_path, "pref.alarmgoesoff.label") }193reminder-play-checkbox =194    .label = { COPY(from_path, "pref.playasound") }195    .accesskey = { COPY(from_path, "pref.calendar.alarms.playsound.accessKey") }196reminder-play-alarm-button =197    .label = { COPY(from_path, "pref.calendar.alarms.sound.play.label") }198    .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.play.accessKey") }199reminder-default-sound-label =200    .label = { COPY(from_path, "pref.calendar.alarms.sound.useDefault.label") }201    .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.useDefault.accessKey") }202reminder-custom-sound-label =203    .label = { COPY(from_path, "pref.calendar.alarms.sound.useCustom.label") }204    .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.useCustom.accessKey") }205reminder-browse-sound-label =206    .label = { COPY(from_path, "pref.calendar.alarms.sound.browse.label") }207    .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.browse.accessKey") }208reminder-dialog-label =209    .label = { COPY(from_path, "pref.showalarmbox") }210    .accesskey = { COPY(from_path, "pref.calendar.alarms.showAlarmBox.accessKey") }211missed-reminder-label =212    .label = { COPY(from_path, "pref.missedalarms2") }213    .accesskey = { COPY(from_path, "pref.calendar.alarms.missedAlarms.accessKey") }214reminder-default-legend = { COPY(from_path, "pref.calendar.alarms.defaults.label") }215default-snooze-label =216    .value = { COPY(from_path, "pref.defaultsnoozelength.label") }217    .accesskey = { COPY(from_path, "pref.defaultsnoozelength.accesskey") }218event-alarm-label =219    .value = { COPY(from_path, "pref.defalarm4events.label") }220    .accesskey = { COPY(from_path, "pref.defalarm4events.accesskey") }221alarm-on-label =222    .label = { COPY(from_path, "pref.alarm.on") }223alarm-off-label =224    .label = { COPY(from_path, "pref.alarm.off") }225task-alarm-label =226    .value = { COPY(from_path, "pref.defalarm4todos.label") }227    .accesskey = { COPY(from_path, "pref.defalarm4todos.accesskey") }228event-alarm-time-label =229    .value = { COPY(from_path, "pref.defalarmlen4events.label") }230    .accesskey = { COPY(from_path, "pref.defalarmlen4events.accesskey") }231task-alarm-time-label =232    .value = { COPY(from_path, "pref.defalarmlen4todos.label") }233    .accesskey = { COPY(from_path, "pref.defalarmlen4todos.accesskey") }234""",235            from_path="calendar/chrome/calendar/preferences/alarms.dtd",236        ),237    )238    ctx.add_transforms(239        "calendar/calendar/preferences.ftl",240        "calendar/calendar/preferences.ftl",241        transforms_from(242            """243category-new-label = { COPY(from_path, "pref.categories.new.title") }244category-edit-label = { COPY(from_path, "pref.categories.edit.title") }245category-overwrite-title = { COPY(from_path, "pref.categories.overwrite.title") }246category-blank-warning = { COPY(from_path, "pref.categories.noBlankCategories") }247""",248            from_path="calendar/chrome/calendar/preferences/categories.dtd",249        ),250    )251    ctx.add_transforms(252        "calendar/calendar/preferences.ftl",253        "calendar/calendar/preferences.ftl",254        [255            FTL.Message(256                id=FTL.Identifier("category-overwrite"),257                value=REPLACE(258                    "calendar/chrome/calendar/preferences/categories.dtd",259                    "pref.categories.overwrite",260                    {" \\n": FTL.TextElement("")},261                ),262            ),263        ],264    )265    ctx.add_transforms(266        "calendar/calendar/category-dialog.ftl",267        "calendar/calendar/category-dialog.ftl",268        transforms_from(269            """270category-name-label = { COPY(from_path, "pref.categories.name.label") }271category-color-label =272    .label = { COPY(from_path, "pref.categories.usecolor.label") }273""",274            from_path="calendar/chrome/calendar/preferences/categories.dtd",275        ),...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
