Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃寪 [Story localization] Removed sound text localizations after removal from system layer #37218

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

mszylkowski
Copy link
Contributor

@mszylkowski mszylkowski commented Dec 14, 2021

Closes #37164

We can safely remove the strings 31, 32, 33 (sound on, sound off, page has no sound) from all localization bundles since they aren't used in the new system UI.

Reduces mjs and js by 0.41kB and 0.47kB.

Used this script:

import json
import os
 
if __name__ == "__main__":
  fileNames = [x for x in os.listdir(".") if x[-5:] == ".json"]
  for name in fileNames:
    contents = dict()
    with open(name, "r", encoding="utf8") as f:
      contents = json.load(f)
      for num in [31, 32, 33]:
        del contents[str(num)]
    with open(name, "w", encoding="utf8") as f:
      json.dump(contents, f, indent=2, ensure_ascii=False)
      f.write("\n")
    print("Processed " + name)

@mszylkowski mszylkowski self-assigned this Dec 14, 2021
@amp-owners-bot
Copy link

Hey @gmajoulet, @newmuis! These files were changed:

extensions/amp-story/1.0/_locales/af.json
extensions/amp-story/1.0/_locales/am.json
extensions/amp-story/1.0/_locales/ar.json
extensions/amp-story/1.0/_locales/bg.json
extensions/amp-story/1.0/_locales/bn.json
extensions/amp-story/1.0/_locales/bs.json
extensions/amp-story/1.0/_locales/ca.json
extensions/amp-story/1.0/_locales/cs.json
extensions/amp-story/1.0/_locales/da.json
extensions/amp-story/1.0/_locales/de.json
extensions/amp-story/1.0/_locales/el.json
extensions/amp-story/1.0/_locales/en-GB.json
+59 more

@mszylkowski mszylkowski added this to In progress in wg-stories Sprint via automation Dec 14, 2021
@mszylkowski mszylkowski requested review from gmajoulet and removed request for calebcordry December 14, 2021 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[Story system-layer] Remove localizations strings for audio messages
3 participants