Skip to content

Commit

Permalink
tweaked nolocale naming scheme to better support other languages
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverDecaf committed Jul 21, 2020
1 parent 21e199e commit aaa5746
Show file tree
Hide file tree
Showing 24 changed files with 6 additions and 5 deletions.
Binary file removed Chromium Web Store NoLocale.crx
Binary file not shown.
Binary file modified Chromium Web Store.crx
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion src_nolocale/manifest.json → en_nolocale/manifest.json
@@ -1 +1 @@
{"author": "NeverDecaf", "manifest_version": 2, "name": "Chromium Web Store", "description": "Enables installation and semi-automatic updating for extensions from the Chrome Web Store (or elsewhere) on Chromium based browsers.", "version": "1.0.3", "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqF/d41Q7agjkUzYq8ZGbQr8XW8mmEIMXOnR1uCTnYLL+Dm9Z+LO50xZukOISNy6zFxpI8ts/OGLsm+I2x9+UprUU4/EVdmxuwegFE6NBoEhHoRNYY0gbXZkaU8YY/XwzjVY/k18DDhl5NYPEnF6uq4Oyidg+xtd3W4+iGYczuOLER1Tp5y614zOTphcvFYhvUkCijQ6HT1TtRq/34SlFoRQqo4SFiLriK451xWIcfwiMLIekWrdoQa1v8dqIlMA3r6CKc0QykJpSYbiyormWiZ0hl2HLpkZ85mD9V0eDQ5RCtb6vkybK7INcq4yKQV4YkXhr9NpX9U4re4dlFQjEJQIDAQAB", "permissions": ["management", "https://clients2.google.com/service/*", "storage", "alarms", "contextMenus", "downloads"], "browser_action": {"default_icon": {"16": "assets/icon/icon_16.png", "24": "assets/icon/icon_24.png"}, "default_title": "Chromium Web Store", "default_popup": "popup.html"}, "content_scripts": [{"matches": ["https://chrome.google.com/webstore*"], "js": ["scripts/inject.js"], "run_at": "document_end"}], "background": {"scripts": ["scripts/util.js", "scripts/background.js"], "persistent": false}, "update_url": "https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates_nolocale.xml", "icons": {"16": "assets/icon/icon_16.png", "24": "assets/icon/icon_24.png", "32": "assets/icon/icon_32.png", "48": "assets/icon/icon_48.png", "64": "assets/icon/icon_64.png", "128": "assets/icon/icon_128.png"}, "homepage_url": "https://github.com/NeverDecaf/chromium-web-store", "options_ui": {"page": "options.html", "chrome_style": true}, "storage": {"managed_schema": "managed_storage.json"}}
{"author": "NeverDecaf", "manifest_version": 2, "name": "Chromium Web Store", "description": "Enables installation and semi-automatic updating for extensions from the Chrome Web Store (or elsewhere) on Chromium based browsers.", "version": "1.0.3", "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqF/d41Q7agjkUzYq8ZGbQr8XW8mmEIMXOnR1uCTnYLL+Dm9Z+LO50xZukOISNy6zFxpI8ts/OGLsm+I2x9+UprUU4/EVdmxuwegFE6NBoEhHoRNYY0gbXZkaU8YY/XwzjVY/k18DDhl5NYPEnF6uq4Oyidg+xtd3W4+iGYczuOLER1Tp5y614zOTphcvFYhvUkCijQ6HT1TtRq/34SlFoRQqo4SFiLriK451xWIcfwiMLIekWrdoQa1v8dqIlMA3r6CKc0QykJpSYbiyormWiZ0hl2HLpkZ85mD9V0eDQ5RCtb6vkybK7INcq4yKQV4YkXhr9NpX9U4re4dlFQjEJQIDAQAB", "permissions": ["management", "https://clients2.google.com/service/*", "storage", "alarms", "contextMenus", "downloads"], "browser_action": {"default_icon": {"16": "assets/icon/icon_16.png", "24": "assets/icon/icon_24.png"}, "default_title": "Chromium Web Store", "default_popup": "popup.html"}, "content_scripts": [{"matches": ["https://chrome.google.com/webstore*"], "js": ["scripts/inject.js"], "run_at": "document_end"}], "background": {"scripts": ["scripts/util.js", "scripts/background.js"], "persistent": false}, "update_url": "https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates_en_nolocale.xml", "icons": {"16": "assets/icon/icon_16.png", "24": "assets/icon/icon_24.png", "32": "assets/icon/icon_32.png", "48": "assets/icon/icon_48.png", "64": "assets/icon/icon_64.png", "128": "assets/icon/icon_128.png"}, "homepage_url": "https://github.com/NeverDecaf/chromium-web-store", "options_ui": {"page": "options.html", "chrome_style": true}, "storage": {"managed_schema": "managed_storage.json"}}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions replace_i18n.py
Expand Up @@ -8,10 +8,10 @@
import fileinput
import re

ANDROID_SRC = './src_nolocale'
LOCALE = 'en'
ANDROID_SRC = './{}_nolocale'.format(LOCALE)
MANIFEST = '{}/manifest.json'.format(ANDROID_SRC)
UPDATE_FILE_NAME = 'updates_nolocale.xml'
UPDATE_FILE_NAME = 'updates_{}_nolocale.xml'.format(LOCALE)
CRX_URL = 'https://github.com/NeverDecaf/chromium-web-store/raw/master/Chromium%20Web%20Store%20NoLocale.crx'

if os.path.exists(ANDROID_SRC):
Expand Down Expand Up @@ -62,7 +62,8 @@
# copy updates.xml and modify to point to android crx
with open('updates.xml','r') as f:
with open(UPDATE_FILE_NAME,'w') as f2:
f2.write(re.sub("(?<=codebase=[\"'])([^'\"]*)",CRX_URL,f.read()))
f2.write(f.read())
# f2.write(re.sub("(?<=codebase=[\"'])([^'\"]*)",CRX_URL,f.read()))

# removes _locales dir
shutil.rmtree(os.path.join(ANDROID_SRC,'_locales'))
2 changes: 1 addition & 1 deletion updates_nolocale.xml → updates_en_nolocale.xml
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='ocaahdebbfolfmndjeplogmgcagdmblk'>
<updatecheck codebase='https://github.com/NeverDecaf/chromium-web-store/raw/master/Chromium%20Web%20Store%20NoLocale.crx' version='1.0.3' />
<updatecheck codebase='https://github.com/NeverDecaf/chromium-web-store/releases/latest/download/Chromium.Web.Store.crx' version='1.0.3' />
</app>
</gupdate>

0 comments on commit aaa5746

Please sign in to comment.