
Loading…
Safari updates #406
+54
−15
Deathamns
commented
gorhill
commented
I thought using % instead of v[hw] would mess up the tip, but I see using position: fixed causes the % to become synonymous of v[hw].
Deathamns
commented
Yeah, position: fixed is relative to the browser window.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This page is out of date. Refresh to see the latest.
Showing
with
54 additions
and 15 deletions.
- +1 −1 platform/safari/Info.plist
- +1 −1 platform/safari/update_safariextz.plist
- +6 −10 platform/safari/vapi-common.js
- +3 −3 src/css/popup.css
- +39 −0 tools/make-locale-safari.py
- +4 −0 tools/make-safari.sh
2
platform/safari/Info.plist
2
platform/safari/update_safariextz.plist
16
platform/safari/vapi-common.js
6
src/css/popup.css
39
tools/make-locale-safari.py
| @@ -0,0 +1,39 @@ | ||
| +#!/usr/bin/env python3 | ||
| + | ||
| +import os | ||
| +import json | ||
| +import sys | ||
| +from shutil import rmtree | ||
| +from collections import OrderedDict | ||
| + | ||
| +if not sys.argv[1]: | ||
| + raise SystemExit('Build dir missing.') | ||
| + | ||
| + | ||
| +def mkdirs(path): | ||
| + try: | ||
| + os.makedirs(path) | ||
| + finally: | ||
| + return os.path.exists(path) | ||
| + | ||
| + | ||
| +build_dir = os.path.abspath(sys.argv[1]) | ||
| +locale_dir = os.path.join(build_dir, '_locales') | ||
| + | ||
| +for alpha2 in os.listdir(locale_dir): | ||
| + locale_path = os.path.join(locale_dir, alpha2, 'messages.json') | ||
| + with open(locale_path, encoding='utf-8') as f: | ||
| + string_data = json.load(f, object_pairs_hook=OrderedDict) | ||
| + | ||
| + for string_name in string_data: | ||
| + string_data[string_name] = string_data[string_name]['message'] | ||
| + | ||
| + rmtree(os.path.join(locale_dir, alpha2)) | ||
| + | ||
| + alpha2 = alpha2.replace('_', '-') | ||
| + locale_path = os.path.join(locale_dir, alpha2 + '.json') | ||
| + | ||
| + mkdirs(os.path.join(locale_dir)) | ||
| + | ||
| + with open(locale_path, 'wt', encoding='utf-8', newline='\n') as f: | ||
| + json.dump(string_data, f, ensure_ascii=False) |
4
tools/make-safari.sh
No description provided.