Skip to content

Commit 79164a4

Browse files
committed
Merge branch 'ADG-10291' into ADG-10294
2 parents f754d7c + 0e3692f commit 79164a4

5 files changed

Lines changed: 31 additions & 1 deletion

File tree

.twosky.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,26 @@
4343
"zh-hk": "繁體中文(香港)",
4444
"zh-tw": "正體中文(台灣)"
4545
}
46+
},
47+
{
48+
"project_id": "home_v2",
49+
"base_locale": "en",
50+
"localizable_files": [
51+
"client_v2/src/__locales/en.json"
52+
],
53+
"languages": {
54+
"de": "Deutsch",
55+
"en": "English",
56+
"es": "Español",
57+
"fr": "Français",
58+
"it": "Italiano",
59+
"ja": "日本語",
60+
"ko": "한국어",
61+
"pt-br": "Português (BR)",
62+
"pt-pt": "Português (PT)",
63+
"ru": "Русский",
64+
"zh-cn": "简体中文",
65+
"zh-tw": "正體中文(台灣)"
66+
}
4667
}
4768
]

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ GO.MACRO = $${GO:-go}
2121
VERBOSE.MACRO = $${VERBOSE:-0}
2222

2323
CHANNEL = development
24-
CLIENT_DIR = client_v2
24+
# TODO: Update CLIENT_DIR to client_v2 for new frontend migration
25+
CLIENT_DIR = client
2526
DEPLOY_SCRIPT_PATH = not/a/real/path
2627
DIST_DIR = dist
2728
GOAMD64 = v1

scripts/companiesdb/download.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -e -f -u -x
66
# for this database is https://github.com/AdguardTeam/companiesdb.
77
#
88
trackers_url='https://raw.githubusercontent.com/AdguardTeam/companiesdb/main/dist/trackers.json'
9+
# TODO: Update output path to './client_v2/src/helpers/trackers/trackers.json' for new frontend migration
910
output='./client/src/helpers/trackers/trackers.json'
1011
readonly trackers_url output
1112

scripts/translations/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ import (
2727

2828
const (
2929
twoskyConfFile = "./.twosky.json"
30+
// TODO: Update localesDir to "./client_v2/src/__locales" for new frontend migration
3031
localesDir = "./client/src/__locales"
3132
defaultBaseFile = "en.json"
3233
defaultProjectID = "home"
34+
// TODO: Update srcDir to "./client_v2/src" for new frontend migration
3335
srcDir = "./client/src"
3436
twoskyURI = "https://twosky.int.agrd.dev/api/v1"
3537

@@ -77,6 +79,8 @@ func main() {
7779
usage("")
7880
}
7981

82+
// TODO: Support multiple projects in .twosky.json - add PROJECT_ID env var to select between 'home' and 'home_v2'
83+
// TODO: Modify readTwoskyConfig() to return all configs and add selectProject() function
8084
conf := errors.Must(readTwoskyConfig())
8185

8286
var cli *twoskyClient
@@ -106,6 +110,7 @@ func main() {
106110
// usage prints usage. If addStr is not empty print addStr and exit with code
107111
// 1, otherwise exit with code 0.
108112
func usage(addStr string) {
113+
// TODO: Add PROJECT_ID environment variable documentation when multi-project support is implemented
109114
const usageStr = `Usage: go run main.go <command> [<args>]
110115
Commands:
111116
help
@@ -161,6 +166,7 @@ func readTwoskyConfig() (t *twoskyConfig, err error) {
161166
return nil, fmt.Errorf("%q is empty", twoskyConfFile)
162167
}
163168

169+
// TODO: Currently only uses first project - modify to support project selection
164170
conf := tsc[0]
165171

166172
for _, lang := range conf.Languages {

scripts/vetted-filters/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func main() {
9595

9696
errors.Check(enc.Encode(aghFlt))
9797

98+
// TODO: Update output path to "client_v2/src/helpers/filters/filters.ts" for new frontend migration
9899
err = maybe.WriteFile("client/src/helpers/filters/filters.ts", buf.Bytes(), 0o644)
99100
errors.Check(err)
100101
}

0 commit comments

Comments
 (0)