Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .twosky.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"project_id": "hostlists-registry",
"base_locale": "en",
"localizable_files": [
"client/src/__locales-services/services.json"
"client/src/__locales-services/en.json"
],
"languages": {
"ar": "العربية",
Expand Down
3 changes: 3 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ Optional environment:

- `go run ./scripts/translations summary`: show the current locales summary.

> [!NOTE]
> The following script may produce false positives because JavaScript uses template literals like `servicesgroup.${group.id}.name`, so the actual key won't be found by substring search.

- `go run ./scripts/translations unused`: show the list of unused strings.

- `go run ./scripts/translations auto-add`: add locales with additions to the git and restore locales with deletions.
Expand Down
5 changes: 3 additions & 2 deletions scripts/translations/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ type languages map[langCode]string
// textlabel is a text label of localization.
type textLabel string

// locales is a map, where key is text label and value is translation.
type locales map[textLabel]string
// locales is a map, where key is a text label and the value is either a string
// or an object.
type locales map[textLabel]any

func main() {
ctx := context.Background()
Expand Down
Loading