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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add semantic groups for services #400

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
0c45df2
changed the check for removed services
jellizaveta Nov 14, 2023
5cad72f
Added support for groups in services
jellizaveta Nov 21, 2023
8765fb0
re-wrote the structure
jellizaveta Nov 22, 2023
8f78df7
restructured the script
jellizaveta Nov 22, 2023
cea11aa
restructured the script
jellizaveta Nov 23, 2023
0e0002d
added base locale
jellizaveta Nov 23, 2023
0112285
localization development
jellizaveta Nov 29, 2023
8015d72
localization development
jellizaveta Nov 29, 2023
764c13d
added localizations to the services general build
jellizaveta Nov 30, 2023
c20472e
added comments, fixed the variable names
jellizaveta Nov 30, 2023
7d86c4f
fixed the variable names
jellizaveta Nov 30, 2023
deccab3
updated readme.md
jellizaveta Nov 30, 2023
2724dde
linter
jellizaveta Nov 30, 2023
4525950
Merge branch 'main' into feature/add_semantic_service_groups
jellizaveta Nov 30, 2023
3079424
merged it with the main branch, added a check for empty groups
jellizaveta Nov 30, 2023
3a4bcd2
added a check for empty groups
jellizaveta Nov 30, 2023
699ef64
Merge branch 'main' into feature/add_semantic_service_groups
jellizaveta Dec 13, 2023
1a271cd
merge main
jellizaveta Dec 18, 2023
38479d1
fixed sorting of objects in services.json file, fixed variable names
jellizaveta Dec 18, 2023
8a8e219
fixed readme.md
jellizaveta Dec 18, 2023
89cccc9
fixed the order of adding localisations. fixed the name of services i…
jellizaveta Dec 18, 2023
99babc3
Merge branch 'main' into feature/add_semantic_service_groups
slavaleleka Dec 26, 2023
eed0180
changed variable names, moved localesDirectories calculation to getGr…
jellizaveta Jan 11, 2024
03ad04d
replaced isExist with fs.existsSync().
jellizaveta Jan 11, 2024
c968fda
made a separate constant for the service translation file
jellizaveta Jan 11, 2024
572ac39
added the use of the dirent object
jellizaveta Jan 11, 2024
b8b811d
moved the typedefs
jellizaveta Jan 11, 2024
ed1b1bb
removed the nullable values check in existingTranslations
jellizaveta Jan 11, 2024
cf3c150
Merge branch 'feature/add_semantic_service_groups' of https://github.…
jellizaveta Jan 11, 2024
08bcca0
added the groups to the new services
jellizaveta Jan 11, 2024
52f4b1f
Fixed the order of tags in new yml files
jellizaveta Jan 11, 2024
461d127
return comment
jellizaveta Jan 11, 2024
8570c3d
use logger
jellizaveta Jan 11, 2024
aba5b08
added a check that there are translations for all groups in the base …
jellizaveta Jan 12, 2024
44063c2
skip todo comments while building i18 file
jellizaveta Jan 12, 2024
72383b2
added jsDoc comment to sortTranslations
jellizaveta Jan 12, 2024
30419d8
Added a check for services that do not have previously submitted groups
jellizaveta Jan 12, 2024
2b551b7
Fixed groupedFileObjects description
jellizaveta Jan 25, 2024
acbbe87
merge main
jellizaveta Jan 25, 2024
3669a75
Fixed jsDoc comments in localizations script
jellizaveta Jan 25, 2024
3342f4b
Fix multiline blocks braces
jellizaveta Jan 25, 2024
4315dce
Fixed sortByID function
jellizaveta Jan 29, 2024
7eca377
Fixed localizations warning
jellizaveta Jan 29, 2024
8311c88
Added check for groupFileContentByTranslations, returned the appropri…
jellizaveta Jan 30, 2024
28b5e63
merge main
jellizaveta Jan 30, 2024
5f0216f
added incoming changes from main
jellizaveta Jan 30, 2024
a035551
created typedef ObjectWithID
jellizaveta Jan 30, 2024
5fefeca
updated the sort function, fixed typedef
jellizaveta Jan 30, 2024
144d10d
Fixed typedefs
jellizaveta Jan 30, 2024
2273674
Fixed jsDoc
jellizaveta Jan 30, 2024
20732b2
Fixed sorting function
jellizaveta Jan 31, 2024
f4e93f6
added zod
jellizaveta Feb 1, 2024
3c9bb9b
added zod validation
jellizaveta Feb 2, 2024
999c5f2
added typedefs to add-localizations script
jellizaveta Feb 2, 2024
94476e4
Added typedefs and zod validation
jellizaveta Feb 2, 2024
0756377
added comments and examples for validation schemes
jellizaveta Feb 2, 2024
6d48a1c
Update services/kik.yml
jellizaveta Feb 2, 2024
f470464
Update services/gog.yml
jellizaveta Feb 2, 2024
4e2d48a
Update services/youtube.yml
jellizaveta Feb 2, 2024
64a40a0
Update services/wechat.yml
jellizaveta Feb 2, 2024
e7c4b33
Update services/claro.yml
jellizaveta Feb 2, 2024
bfb5d3e
Update services/pinterest.yml
jellizaveta Feb 2, 2024
7c2c2d7
Update services/skype.yml
jellizaveta Feb 2, 2024
b6b766c
Update services/kakaotalk.yml
jellizaveta Feb 5, 2024
8a57982
Fixed the groups and group descriptions
jellizaveta Feb 5, 2024
9cc81e7
Removed types that are already described in the code
jellizaveta Feb 5, 2024
76b712c
Added empty line in files
jellizaveta Feb 5, 2024
b068828
removed unused vars
jellizaveta Feb 5, 2024
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ module.exports = {
},
],
'jsdoc/valid-types': 'off',
curly: ['error', 'all'],
},
};
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,24 @@ The `services.json` file combines information about services received from separ

- It is also forbidden to change service `id` inside the `.yml` file.

Service metadata includes `id`, `name`, `rules`, `icon_svg`:
Service metadata includes `id`, `name`, `rules`, `icon_svg`, `group`:

- `id` — unique human-readable service identifier (string, as `snake_case`)
- `name` — service name (string)
- `rules` — list of domain rules in Adblock syntax (list of strings)
- `icon_svg` — svg icon (string)
- `group` - semantic group for service. Possible values:
- `cdn`,
- `dating`,
- `gambling`,
- `gaming`,
- `hosting`,
- `messenger`,
- `privacy`,
- `shopping`,
- `social_network`,
- `software`,
jellizaveta marked this conversation as resolved.
Show resolved Hide resolved
- `streaming`
jellizaveta marked this conversation as resolved.
Show resolved Hide resolved

<details>

Expand All @@ -171,22 +183,24 @@ services.json - wechat object
"id": "wechat",
"name": "WeChat",
"rules": ["||wechat.com^", "||weixin.qq.com^", "||wx.qq.com^"],
"icon_svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" className=\"d-none\"><symbol id=\"service_wechat\" viewBox=\"0 0 50 50\" fill=\"currentColor\"><path d=\"M 19 6 C 9.625 6 2 12.503906 2 20.5 C 2 24.769531 4.058594 28.609375 7.816406 31.390625 L 5.179688 39.304688 L 13.425781 34.199219 C 15.714844 34.917969 18.507813 35.171875 21.203125 34.875 C 23.390625 39.109375 28.332031 42 34 42 C 35.722656 42 37.316406 41.675781 38.796875 41.234375 L 45.644531 45.066406 L 43.734375 38.515625 C 46.3125 36.375 48 33.394531 48 30 C 48 23.789063 42.597656 18.835938 35.75 18.105469 C 34.40625 11.152344 27.367188 6 19 6 Z M 13 14 C 14.101563 14 15 14.898438 15 16 C 15 17.101563 14.101563 18 13 18 C 11.898438 18 11 17.101563 11 16 C 11 14.898438 11.898438 14 13 14 Z M 25 14 C 26.101563 14 27 14.898438 27 16 C 27 17.101563 26.101563 18 25 18 C 23.898438 18 23 17.101563 23 16 C 23 14.898438 23.898438 14 25 14 Z M 34 20 C 40.746094 20 46 24.535156 46 30 C 46 32.957031 44.492188 35.550781 42.003906 37.394531 L 41.445313 37.8125 L 42.355469 40.933594 L 39.105469 39.109375 L 38.683594 39.25 C 37.285156 39.71875 35.6875 40 34 40 C 27.253906 40 22 35.464844 22 30 C 22 24.535156 27.253906 20 34 20 Z M 29.5 26 C 28.699219 26 28 26.699219 28 27.5 C 28 28.300781 28.699219 29 29.5 29 C 30.300781 29 31 28.300781 31 27.5 C 31 26.699219 30.300781 26 29.5 26 Z M 38.5 26 C 37.699219 26 37 26.699219 37 27.5 C 37 28.300781 37.699219 29 38.5 29 C 39.300781 29 40 28.300781 40 27.5 C 40 26.699219 39.300781 26 38.5 26 Z\" /></symbol></svg>"
"icon_svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" className=\"d-none\"><symbol id=\"service_wechat\" viewBox=\"0 0 50 50\" fill=\"currentColor\"><path d=\"M 19 6 C 9.625 6 2 12.503906 2 20.5 C 2 24.769531 4.058594 28.609375 7.816406 31.390625 L 5.179688 39.304688 L 13.425781 34.199219 C 15.714844 34.917969 18.507813 35.171875 21.203125 34.875 C 23.390625 39.109375 28.332031 42 34 42 C 35.722656 42 37.316406 41.675781 38.796875 41.234375 L 45.644531 45.066406 L 43.734375 38.515625 C 46.3125 36.375 48 33.394531 48 30 C 48 23.789063 42.597656 18.835938 35.75 18.105469 C 34.40625 11.152344 27.367188 6 19 6 Z M 13 14 C 14.101563 14 15 14.898438 15 16 C 15 17.101563 14.101563 18 13 18 C 11.898438 18 11 17.101563 11 16 C 11 14.898438 11.898438 14 13 14 Z M 25 14 C 26.101563 14 27 14.898438 27 16 C 27 17.101563 26.101563 18 25 18 C 23.898438 18 23 17.101563 23 16 C 23 14.898438 23.898438 14 25 14 Z M 34 20 C 40.746094 20 46 24.535156 46 30 C 46 32.957031 44.492188 35.550781 42.003906 37.394531 L 41.445313 37.8125 L 42.355469 40.933594 L 39.105469 39.109375 L 38.683594 39.25 C 37.285156 39.71875 35.6875 40 34 40 C 27.253906 40 22 35.464844 22 30 C 22 24.535156 27.253906 20 34 20 Z M 29.5 26 C 28.699219 26 28 26.699219 28 27.5 C 28 28.300781 28.699219 29 29.5 29 C 30.300781 29 31 28.300781 31 27.5 C 31 26.699219 30.300781 26 29.5 26 Z M 38.5 26 C 37.699219 26 37 26.699219 37 27.5 C 37 28.300781 37.699219 29 38.5 29 C 39.300781 29 40 28.300781 40 27.5 C 40 26.699219 39.300781 26 38.5 26 Z\" /></symbol></svg>",
"group": "social_network"
}
```

wechat.yml

```yml
id: wechat
name: WeChat
rules:
- '||wechat.com^'
- '||weixin.qq.com^'
- '||weixin.qq.com.cn^'
- '||weixinbridge.com^'
- '||wx.qq.com^'
icon_svg: <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 50 50"><path d="M 19 6 C 9.625 6 2 12.503906 2 20.5 C 2 24.769531 4.058594 28.609375 7.816406 31.390625 L 5.179688 39.304688 L 13.425781 34.199219 C 15.714844 34.917969 18.507813 35.171875 21.203125 34.875 C 23.390625 39.109375 28.332031 42 34 42 C 35.722656 42 37.316406 41.675781 38.796875 41.234375 L 45.644531 45.066406 L 43.734375 38.515625 C 46.3125 36.375 48 33.394531 48 30 C 48 23.789063 42.597656 18.835938 35.75 18.105469 C 34.40625 11.152344 27.367188 6 19 6 Z M 13 14 C 14.101563 14 15 14.898438 15 16 C 15 17.101563 14.101563 18 13 18 C 11.898438 18 11 17.101563 11 16 C 11 14.898438 11.898438 14 13 14 Z M 25 14 C 26.101563 14 27 14.898438 27 16 C 27 17.101563 26.101563 18 25 18 C 23.898438 18 23 17.101563 23 16 C 23 14.898438 23.898438 14 25 14 Z M 34 20 C 40.746094 20 46 24.535156 46 30 C 46 32.957031 44.492188 35.550781 42.003906 37.394531 L 41.445313 37.8125 L 42.355469 40.933594 L 39.105469 39.109375 L 38.683594 39.25 C 37.285156 39.71875 35.6875 40 34 40 C 27.253906 40 22 35.464844 22 30 C 22 24.535156 27.253906 20 34 20 Z M 29.5 26 C 28.699219 26 28 26.699219 28 27.5 C 28 28.300781 28.699219 29 29.5 29 C 30.300781 29 31 28.300781 31 27.5 C 31 26.699219 30.300781 26 29.5 26 Z M 38.5 26 C 37.699219 26 37 26.699219 37 27.5 C 37 28.300781 37.699219 29 38.5 29 C 39.300781 29 40 28.300781 40 27.5 C 40 26.699219 39.300781 26 38.5 26 Z" /></svg>
name: WeChat
rules:
- '||wechat.com^'
- '||weixin.qq.com^'
- '||weixin.qq.com.cn^'
- '||weixinbridge.com^'
- '||wx.qq.com^'
icon_svg: <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 50 50"><path d="M 19 6 C 9.625 6 2 12.503906 2 20.5 C 2 24.769531 4.058594 28.609375 7.816406 31.390625 L 5.179688 39.304688 L 13.425781 34.199219 C 15.714844 34.917969 18.507813 35.171875 21.203125 34.875 C 23.390625 39.109375 28.332031 42 34 42 C 35.722656 42 37.316406 41.675781 38.796875 41.234375 L 45.644531 45.066406 L 43.734375 38.515625 C 46.3125 36.375 48 33.394531 48 30 C 48 23.789063 42.597656 18.835938 35.75 18.105469 C 34.40625 11.152344 27.367188 6 19 6 Z M 13 14 C 14.101563 14 15 14.898438 15 16 C 15 17.101563 14.101563 18 13 18 C 11.898438 18 11 17.101563 11 16 C 11 14.898438 11.898438 14 13 14 Z M 25 14 C 26.101563 14 27 14.898438 27 16 C 27 17.101563 26.101563 18 25 18 C 23.898438 18 23 17.101563 23 16 C 23 14.898438 23.898438 14 25 14 Z M 34 20 C 40.746094 20 46 24.535156 46 30 C 46 32.957031 44.492188 35.550781 42.003906 37.394531 L 41.445313 37.8125 L 42.355469 40.933594 L 39.105469 39.109375 L 38.683594 39.25 C 37.285156 39.71875 35.6875 40 34 40 C 27.253906 40 22 35.464844 22 30 C 22 24.535156 27.253906 20 34 20 Z M 29.5 26 C 28.699219 26 28 26.699219 28 27.5 C 28 28.300781 28.699219 29 29.5 29 C 30.300781 29 31 28.300781 31 27.5 C 31 26.699219 30.300781 26 29.5 26 Z M 38.5 26 C 37.699219 26 37 26.699219 37 27.5 C 37 28.300781 37.699219 29 38.5 29 C 39.300781 29 40 28.300781 40 27.5 C 40 26.699219 39.300781 26 38.5 26 Z" /></svg>
group: social_network
```

</details>
Expand Down
Loading
Loading