Closed Neo42 closed 4 years ago
Didn't aim to replication ability, but should work. Just clone the repo and remove almost everything from repositories/sveltejs/svelte/...
. Then do:
npm install
- for installing dependenciesnpm run update-svelte
- to download current version of official site and copy all translated files from repositories/sveltejs/svelte/...
directory into it. Also phrases from the translation.json
will be replaced in non *.md
files.npm run dev
to run development copy of the site.
....
Now copy untranslated md
files from official repository to repositories...
dir respecting hierarhy and translate it. Added files will be automaticly apply.
....npm run build-svelte && npm run start-svelte
.PS: it is work on Ubuntu but i have not tested in other OS.
PS2: There was a lot questions before so I decided to make tool for translating node sites: https://www.npmjs.com/package/trpatcher - you may try to use it, but it may not working properly.
Thank you very much! I'll have a try asap! Well done for the translation to you guys btw.
Sorry to bother you again but something went wrong for me. Here is what I did:
repositories/sveltejs/svelte
npm install
npm run update-svelte
But after these steps repositories/sveltejs/svelte
is still empty. I don't know if it's because that I removed the wrong files and folders. And here is the error I got:
npm run update-svelte
> svelte3-translation-ru@1.0.0 update-svelte /Users/Jarvis/Code/svelte3-translation-ru
> node scripts/do update svelte
Cloning into '__svelte'...
remote: Enumerating objects: 5883, done.
remote: Counting objects: 100% (5883/5883), done.
remote: Compressing objects: 100% (4833/4833), done.
remote: Total 5883 (delta 550), reused 4610 (delta 408), pack-reused 0
Receiving objects: 100% (5883/5883), 2.46 MiB | 456.00 KiB/s, done.
Resolving deltas: 100% (550/550), done.
Checking out files: 100% (4491/4491), done.
cp: no such file or directory: repositories/sveltejs/svelte/site/.
> core-js@2.6.9 postinstall /Users/Jarvis/Code/svelte3-translation-ru/__svelte/site/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm WARN svelte.dev@1.0.0 No repository field.
npm WARN svelte.dev@1.0.0 No license field.
added 483 packages from 1678 contributors in 18.27s
3 packages are looking for funding
run `npm fund` for details
> svelte.dev@1.0.0 update /Users/Jarvis/Code/svelte3-translation-ru/__svelte/site
> node scripts/update_template.js && node scripts/get-contributors.js && node scripts/update_whos_using.js
> cloned sveltejs/template#master to scripts/svelte-app
(node:48916) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:48916) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:48916) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
1 / 332: Rich-Harris
2 / 332: Conduitry
(node:48921) UnhandledPromiseRejectionWarning: FetchError: request to https://avatars1.githubusercontent.com/u/16696352?v=4 failed, reason: connect ECONNREFUSED 151.101.228.133:443
at ClientRequest.<anonymous> (/Users/Jarvis/Code/svelte3-translation-ru/__svelte/site/node_modules/node-fetch/lib/index.js:1461:11)
at ClientRequest.emit (events.js:314:20)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:100:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:48921) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:48921) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
> cloned sveltejs/community#master to scripts/community
(node:48998) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:48998) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:48998) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
Errors during setup the svelte site. Try to leave files translation.json
, .env
and config.js
. May help.
Oh yeah, it worked. Thanks again.
Could you please tell me how to use this repo as a template for another language? I'd love to translate the documentation into Chinese and would be grateful if you can tell me where to start.