Skip to content

Commit

Permalink
Bug 1295157 - create devtools l10n migration script for dtd to proper…
Browse files Browse the repository at this point in the history
…ties migration;r=Pike

For devtools-html, devtools will progressively stop using DTD files and will use only properties
files. To avoid retranslating already localized strings in every locale, this script can be used
by localization teams to automatically migrate strings moved in the scope of the devtools-html
project.

MozReview-Commit-ID: KNDfCoPXOM9
  • Loading branch information
juliandescottes committed Sep 8, 2016
1 parent f37048b commit 4e66278
Show file tree
Hide file tree
Showing 6 changed files with 397 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/devtools/migrate-l10n/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
devtools-l10n-migration script
==============================

For devtools.html, devtools will no longer rely on DTD files. This migration
script is aimed at localizers to automate the migration of strings from DTD to
properties files.

How to run this script?

To migrate all configuration files:
python migrate/main.py path/to/your/l10n/repo/ -c migrate/conf/

To migrate only one configuration file:
python migrate/main.py path/to/your/l10n/repo/ -c migrate/conf/bug1294186

All configuration files should be named after the bug where specific devtools strings were migrated.
Empty file.
22 changes: 22 additions & 0 deletions python/devtools/migrate-l10n/migrate/conf/bug1294186
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
font-inspector.properties:fontinspector.seeAll.tooltip = font-inspector.dtd:showAllFonts
font-inspector.properties:fontinspector.seeAll = font-inspector.dtd:showAllFontsUsed
font-inspector.properties:fontinspector.usedAs = font-inspector.dtd:usedAs
font-inspector.properties:fontinspector.system = font-inspector.dtd:system
font-inspector.properties:fontinspector.remote = font-inspector.dtd:remote
font-inspector.properties:fontinspector.previewText = font-inspector.dtd:previewHint

inspector.properties:inspector.eyedropper.label = inspector.dtd:inspectorEyeDropper.label
inspector.properties:inspector.breadcrumbs.label = inspector.dtd:inspectorBreadcrumbsGroup

boxmodel.properties:boxmodel.title = layoutview.dtd:layoutViewTitle
boxmodel.properties:boxmodel.margin = layoutview.dtd:margin.tooltip
boxmodel.properties:boxmodel.padding = layoutview.dtd:padding.tooltip
boxmodel.properties:boxmodel.border = layoutview.dtd:border.tooltip
boxmodel.properties:boxmodel.content = layoutview.dtd:content.tooltip
boxmodel.properties:boxmodel.geometryButton.tooltip = layoutview.dtd:geometry.button.tooltip

inspector.properties:inspector.browserStyles.label = styleinspector.dtd:browserStylesLabel
inspector.properties:inspector.filterStyles.placeholder = styleinspector.dtd:filterStylesPlaceholder
inspector.properties:inspector.addRule.tooltip = styleinspector.dtd:addRuleButtonTooltip
inspector.properties:inspector.togglePseudo.tooltip = styleinspector.dtd:togglePseudoClassPanel
inspector.properties:inspector.noProperties = styleinspector.dtd:noPropertiesFound
98 changes: 98 additions & 0 deletions python/devtools/migrate-l10n/migrate/conf/bug1308500
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
netmonitor.properties:netmonitor.perfNotice1 = netmonitor.dtd:netmonitorUI.perfNotice1
netmonitor.properties:netmonitor.perfNotice2 = netmonitor.dtd:netmonitorUI.perfNotice2
netmonitor.properties:netmonitor.perfNotice3 = netmonitor.dtd:netmonitorUI.perfNotice3
netmonitor.properties:netmonitor.reloadNotice1 = netmonitor.dtd:netmonitorUI.reloadNotice1
netmonitor.properties:netmonitor.reloadNotice2 = netmonitor.dtd:netmonitorUI.reloadNotice2
netmonitor.properties:netmonitor.reloadNotice3 = netmonitor.dtd:netmonitorUI.reloadNotice3
netmonitor.properties:netmonitor.toolbar.status3 = netmonitor.dtd:netmonitorUI.toolbar.status3
netmonitor.properties:netmonitor.toolbar.method = netmonitor.dtd:netmonitorUI.toolbar.method
netmonitor.properties:netmonitor.toolbar.file = netmonitor.dtd:netmonitorUI.toolbar.file
netmonitor.properties:netmonitor.toolbar.domain = netmonitor.dtd:netmonitorUI.toolbar.domain
netmonitor.properties:netmonitor.toolbar.cause = netmonitor.dtd:netmonitorUI.toolbar.cause
netmonitor.properties:netmonitor.toolbar.type = netmonitor.dtd:netmonitorUI.toolbar.type
netmonitor.properties:netmonitor.toolbar.transferred = netmonitor.dtd:netmonitorUI.toolbar.transferred
netmonitor.properties:netmonitor.toolbar.size = netmonitor.dtd:netmonitorUI.toolbar.size
netmonitor.properties:netmonitor.toolbar.waterfall = netmonitor.dtd:netmonitorUI.toolbar.waterfall
netmonitor.properties:netmonitor.tab.headers = netmonitor.dtd:netmonitorUI.tab.headers
netmonitor.properties:netmonitor.tab.cookies = netmonitor.dtd:netmonitorUI.tab.cookies
netmonitor.properties:netmonitor.tab.params = netmonitor.dtd:netmonitorUI.tab.params
netmonitor.properties:netmonitor.tab.response = netmonitor.dtd:netmonitorUI.tab.response
netmonitor.properties:netmonitor.tab.timings = netmonitor.dtd:netmonitorUI.tab.timings
netmonitor.properties:netmonitor.tab.preview = netmonitor.dtd:netmonitorUI.tab.preview
netmonitor.properties:netmonitor.tab.security = netmonitor.dtd:netmonitorUI.tab.security
netmonitor.properties:netmonitor.footer.filterAll = netmonitor.dtd:netmonitorUI.footer.filterAll
netmonitor.properties:netmonitor.footer.filterHTML = netmonitor.dtd:netmonitorUI.footer.filterHTML
netmonitor.properties:netmonitor.footer.filterCSS = netmonitor.dtd:netmonitorUI.footer.filterCSS
netmonitor.properties:netmonitor.footer.filterJS = netmonitor.dtd:netmonitorUI.footer.filterJS
netmonitor.properties:netmonitor.footer.filterXHR = netmonitor.dtd:netmonitorUI.footer.filterXHR
netmonitor.properties:netmonitor.footer.filterFonts = netmonitor.dtd:netmonitorUI.footer.filterFonts
netmonitor.properties:netmonitor.footer.filterImages = netmonitor.dtd:netmonitorUI.footer.filterImages
netmonitor.properties:netmonitor.footer.filterMedia = netmonitor.dtd:netmonitorUI.footer.filterMedia
netmonitor.properties:netmonitor.footer.filterFlash = netmonitor.dtd:netmonitorUI.footer.filterFlash
netmonitor.properties:netmonitor.footer.filterWS = netmonitor.dtd:netmonitorUI.footer.filterWS
netmonitor.properties:netmonitor.footer.filterOther = netmonitor.dtd:netmonitorUI.footer.filterOther
netmonitor.properties:netmonitor.footer.filterFreetext.label = netmonitor.dtd:netmonitorUI.footer.filterFreetext.label
netmonitor.properties:netmonitor.footer.filterFreetext.key = netmonitor.dtd:netmonitorUI.footer.filterFreetext.key
netmonitor.properties:netmonitor.footer.clear = netmonitor.dtd:netmonitorUI.footer.clear
netmonitor.properties:netmonitor.footer.perf = netmonitor.dtd:netmonitorUI.footer.perf
netmonitor.properties:netmonitor.panesButton.tooltip = netmonitor.dtd:netmonitorUI.panesButton.tooltip
netmonitor.properties:netmonitor.summary.url = netmonitor.dtd:netmonitorUI.summary.url
netmonitor.properties:netmonitor.summary.method = netmonitor.dtd:netmonitorUI.summary.method
netmonitor.properties:netmonitor.summary.address = netmonitor.dtd:netmonitorUI.summary.address
netmonitor.properties:netmonitor.summary.status = netmonitor.dtd:netmonitorUI.summary.status
netmonitor.properties:netmonitor.summary.version = netmonitor.dtd:netmonitorUI.summary.version
netmonitor.properties:netmonitor.summary.editAndResend = netmonitor.dtd:netmonitorUI.summary.editAndResend
netmonitor.properties:netmonitor.summary.rawHeaders = netmonitor.dtd:netmonitorUI.summary.rawHeaders
netmonitor.properties:netmonitor.summary.rawHeaders.requestHeaders = netmonitor.dtd:netmonitorUI.summary.rawHeaders.requestHeaders
netmonitor.properties:netmonitor.summary.rawHeaders.responseHeaders = netmonitor.dtd:netmonitorUI.summary.rawHeaders.responseHeaders
netmonitor.properties:netmonitor.summary.size = netmonitor.dtd:netmonitorUI.summary.size
netmonitor.properties:netmonitor.response.name = netmonitor.dtd:netmonitorUI.response.name
netmonitor.properties:netmonitor.response.dimensions = netmonitor.dtd:netmonitorUI.response.dimensions
netmonitor.properties:netmonitor.response.mime = netmonitor.dtd:netmonitorUI.response.mime
netmonitor.properties:netmonitor.timings.blocked = netmonitor.dtd:netmonitorUI.timings.blocked
netmonitor.properties:netmonitor.timings.dns = netmonitor.dtd:netmonitorUI.timings.dns
netmonitor.properties:netmonitor.timings.connect = netmonitor.dtd:netmonitorUI.timings.connect
netmonitor.properties:netmonitor.timings.send = netmonitor.dtd:netmonitorUI.timings.send
netmonitor.properties:netmonitor.timings.wait = netmonitor.dtd:netmonitorUI.timings.wait
netmonitor.properties:netmonitor.timings.receive = netmonitor.dtd:netmonitorUI.timings.receive
netmonitor.properties:netmonitor.security.warning.cipher = netmonitor.dtd:netmonitorUI.security.warning.cipher
netmonitor.properties:netmonitor.security.error = netmonitor.dtd:netmonitorUI.security.error
netmonitor.properties:netmonitor.security.protocolVersion = netmonitor.dtd:netmonitorUI.security.protocolVersion
netmonitor.properties:netmonitor.security.cipherSuite = netmonitor.dtd:netmonitorUI.security.cipherSuite
netmonitor.properties:netmonitor.security.hsts = netmonitor.dtd:netmonitorUI.security.hsts
netmonitor.properties:netmonitor.security.hpkp = netmonitor.dtd:netmonitorUI.security.hpkp
netmonitor.properties:netmonitor.security.connection = netmonitor.dtd:netmonitorUI.security.connection
netmonitor.properties:netmonitor.security.certificate = netmonitor.dtd:netmonitorUI.security.certificate
netmonitor.properties:netmonitor.context.copyUrl = netmonitor.dtd:netmonitorUI.context.copyUrl
netmonitor.properties:netmonitor.context.copyUrl.accesskey = netmonitor.dtd:netmonitorUI.context.copyUrl.accesskey
netmonitor.properties:netmonitor.context.copyUrlParams = netmonitor.dtd:netmonitorUI.context.copyUrlParams
netmonitor.properties:netmonitor.context.copyUrlParams.accesskey = netmonitor.dtd:netmonitorUI.context.copyUrlParams.accesskey
netmonitor.properties:netmonitor.context.copyPostData = netmonitor.dtd:netmonitorUI.context.copyPostData
netmonitor.properties:netmonitor.context.copyPostData.accesskey = netmonitor.dtd:netmonitorUI.context.copyPostData.accesskey
netmonitor.properties:netmonitor.context.copyAsCurl = netmonitor.dtd:netmonitorUI.context.copyAsCurl
netmonitor.properties:netmonitor.context.copyAsCurl.accesskey = netmonitor.dtd:netmonitorUI.context.copyAsCurl.accesskey
netmonitor.properties:netmonitor.context.copyRequestHeaders = netmonitor.dtd:netmonitorUI.context.copyRequestHeaders
netmonitor.properties:netmonitor.context.copyRequestHeaders.accesskey = netmonitor.dtd:netmonitorUI.context.copyRequestHeaders.accesskey
netmonitor.properties:netmonitor.context.copyResponseHeaders = netmonitor.dtd:netmonitorUI.context.copyResponseHeaders
netmonitor.properties:netmonitor.context.copyResponseHeaders.accesskey = netmonitor.dtd:netmonitorUI.context.copyResponseHeaders.accesskey
netmonitor.properties:netmonitor.context.copyResponse = netmonitor.dtd:netmonitorUI.context.copyResponse
netmonitor.properties:netmonitor.context.copyResponse.accesskey = netmonitor.dtd:netmonitorUI.context.copyResponse.accesskey
netmonitor.properties:netmonitor.context.copyImageAsDataUri = netmonitor.dtd:netmonitorUI.context.copyImageAsDataUri
netmonitor.properties:netmonitor.context.copyImageAsDataUri.accesskey = netmonitor.dtd:netmonitorUI.context.copyImageAsDataUri.accesskey
netmonitor.properties:netmonitor.context.copyAllAsHar = netmonitor.dtd:netmonitorUI.context.copyAllAsHar
netmonitor.properties:netmonitor.context.copyAllAsHar.accesskey = netmonitor.dtd:netmonitorUI.context.copyAllAsHar.accesskey
netmonitor.properties:netmonitor.context.saveAllAsHar = netmonitor.dtd:netmonitorUI.context.saveAllAsHar
netmonitor.properties:netmonitor.context.saveAllAsHar.accesskey = netmonitor.dtd:netmonitorUI.context.saveAllAsHar.accesskey
netmonitor.properties:netmonitor.context.editAndResend = netmonitor.dtd:netmonitorUI.summary.editAndResend
netmonitor.properties:netmonitor.context.editAndResend.accesskey = netmonitor.dtd:netmonitorUI.summary.editAndResend.accesskey
netmonitor.properties:netmonitor.context.newTab = netmonitor.dtd:netmonitorUI.context.newTab
netmonitor.properties:netmonitor.context.newTab.accesskey = netmonitor.dtd:netmonitorUI.context.newTab.accesskey
netmonitor.properties:netmonitor.context.perfTools = netmonitor.dtd:netmonitorUI.context.perfTools
netmonitor.properties:netmonitor.context.perfTools.accesskey = netmonitor.dtd:netmonitorUI.context.perfTools.accesskey
netmonitor.properties:netmonitor.custom.newRequest = netmonitor.dtd:netmonitorUI.custom.newRequest
netmonitor.properties:netmonitor.custom.query = netmonitor.dtd:netmonitorUI.custom.query
netmonitor.properties:netmonitor.custom.headers = netmonitor.dtd:netmonitorUI.custom.headers
netmonitor.properties:netmonitor.custom.postData = netmonitor.dtd:netmonitorUI.custom.postData
netmonitor.properties:netmonitor.custom.send = netmonitor.dtd:netmonitorUI.custom.send
netmonitor.properties:netmonitor.custom.cancel = netmonitor.dtd:netmonitorUI.custom.cancel
netmonitor.properties:netmonitor.backButton = netmonitor.dtd:netmonitorUI.backButton
Loading

0 comments on commit 4e66278

Please sign in to comment.