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 5 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
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ const fs = require('fs/promises');

const { getJsonBlockedData, getYmlSourcesBlockedServices } = require('./scripts/services/get-services-content');
const { mergeServicesData, groupServicesData } = require('./scripts/services/merge-services-data');
const { getDifferences, sortByProperty } = require('./scripts/helpers/helpers');
const { getDifferences, sortByKey } = require('./scripts/helpers/helpers');
const { restoreRemovedSourceFiles } = require('./scripts/services/restore-removed-services');
const { validateSvgIcons } = require('./scripts/services/validate-svg-icons');
const { addServiceLocalizations } = require('./scripts/services/add-localizations');
const { groupedServicesSchema } = require('./scripts/services/zod-schemas');

const { logger } = require('./scripts/helpers/logger');

Expand Down Expand Up @@ -53,15 +54,15 @@ const buildServices = async (sourceDirPath, distFilePath) => {
// If there are differences, throw warning and add them to the services.json file
if (groupsDifferences) {
// Add to final services.json file absent groups
groupedServicesData.groups = sortByProperty(
groupedServicesData.groups = sortByKey(
[...groupedServicesData.groups, ...groupsDifferences],
'value',
'id',
);
// Get groups name for warning
const absentGroups = groupsDifferences.map((group) => group.id);
logger.warning(`These groups have no services: ${absentGroups.join(', ')}`);
}
groupedServicesSchema.parse(groupedServicesData);
// Write the grouped service data to the destination JSON file
await fs.writeFile(distFilePath, JSON.stringify(groupedServicesData, null, 2));
logger.success(`Successfully finished building ${distFilePath}`);
Expand Down
Loading
Loading