{"id":20052555,"url":"https://github.com/subins2000/kde-weblate","last_synced_at":"2026-02-15T20:32:37.234Z","repository":{"id":39837700,"uuid":"176633277","full_name":"subins2000/kde-weblate","owner":"subins2000","description":"Weblate instance for KDE","archived":false,"fork":false,"pushed_at":"2022-12-09T05:25:09.000Z","size":224,"stargazers_count":3,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T11:45:29.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subins2000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-20T02:06:46.000Z","updated_at":"2023-03-04T11:39:05.000Z","dependencies_parsed_at":"2022-09-22T23:01:34.934Z","dependency_job_id":null,"html_url":"https://github.com/subins2000/kde-weblate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/subins2000/kde-weblate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subins2000%2Fkde-weblate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subins2000%2Fkde-weblate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subins2000%2Fkde-weblate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subins2000%2Fkde-weblate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subins2000","download_url":"https://codeload.github.com/subins2000/kde-weblate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subins2000%2Fkde-weblate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29488561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T12:18:15.923Z","updated_at":"2026-02-15T20:32:37.220Z","avatar_url":"https://github.com/subins2000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KDE Weblate Translation\n\n## Translation\n\n* [Signup for an account](//kde.smc.org.in)\n* Choose a project and a component\n* Start translating\n\n**IMPORTANT** : After translation, add your name to `Your names` (`NAME OF TRANSLATORS`) and email to `Your emails`. If there already exist a value, add yours after a comma. Example :\n\n* Your names :\n  ```\n  ശ്യാം കൃഷ്ണന്‍ സി.ആര്‍.,സുബിന്‍ സിബി\n  ```\n* Your emails :\n  ```\n  shyam@example.com,subin@example.com\n  ```\n\n## Workflow\n\nThere are 3 repos :\n\n* KDE Upstream repo (SVN)\n* Intermediary repo (git) : [This repo](https://github.com/FOSSersVAST/kde-pos).\n* Weblate local repo (git) : Local copy of the intermediary repo\n\nWe need to make the intermediary repo and then setup Weblate.\n\nWeblate will work with the intermediary repo, and we'll have to manually merge the intermediary repo with KDE upstream (not that much of difficulty).\n\n## Setup\n\nIf your language team is not using Summit, use it. [Instructions here](https://github.com/subins2000/kde-weblate/blob/master/SETTING-UP-SUMMIT.md).\n\nUsing summit helps you to maintain only one branch for both trunk and stable.\n\n### Intermediary repo\n\nWe need to create a new git repo which will act as an intermediary between KDE upstream repo (SVN) and Weblate.\n\nWeblate will use this intermediary git repo for syncing.\n\nThe intermediary repo after the setup will have this folder structure :\n\n* pos\n  * ml\n    * dolphin\n    * kde-workspace\n    * ...\n* upstream\n  * summit\n    * ml\n      * dolphin\n      * kde-workspace\n      * ...\n    * templates\n* README.md\n* ...\n\nMake the upstream directory structure :\n\n```\nmkdir upstream upstream/summit\ncd upstream/summit\nsvn co svn+ssh://svn@svn.kde.org/home/kde/trunk/l10n-support/ml/summit/messages ml\nsvn co svn+ssh://svn@svn.kde.org/home/kde/trunk/l10n-support/templates/summit/messages templates\n```\n\nThen, make the folder `pos` in the root, and copy files from `upstream/summit` folder with the exact sub-directory structure. For example, if you want to add Dolphin file manager (`dolphin`), then :\n\n```\nmkdir pos pos/ml pos/ml/dolphin\ncp \"upstream/summit/ml/dolphin/*\" \"pos/ml/dolphin/\"\n```\n\n#### Adding a new component\n\nCopy file from upstream to corresponding one in `pos` folder.\n\nThen import from git to weblate (the command in the [Importing components to Weblate section](#importing-components-to-weblate)) :\n\n```\nweblate import_project ...\n```\n\n#### Searching for strings\n\nTo search for a particular string, do this in upstream :\n\n```\ngrep -rnw '.' --include=\"*.po\" -e '\"Open Path\"'\n```\n\n### Weblate\n\n* Clone this repo\n* Install :\n  ```\n  sudo apt install libpq-dev # https://stackoverflow.com/a/12037133/1372424\n  sudo apt install libacl1-dev\n  export PIPENV_VENV_IN_PROJECT=1\n  pipenv install\n  ```\n* Make `.env` :\n  ```\n  cp .env.example .env\n  ```\n  Edit the new `.env` and set a [Django secret key](https://djecrety.ir/), database credentials and optional other fetures.\n* Get into the environment and let Weblate know the settings :\n  ```\n  pipenv shell\n  ln -s $(realpath settings.py) .venv/lib/python3.6/site-packages/weblate/settings.py\n  ```\n* Setup Redis \u0026 Celery :\n  ```\n  sudo apt install redis-server\n  .venv/lib/python3.6/site-packages/weblate/examples/celery start\n  ```\n* Create admin user :\n  ```\n  weblate createsuperuser\n  ```\n* Set domain in Django Admin -\u003e Sites\n* You need to update Weblate's plural form to accomodate with scripty's choice because scripty will change it to `(n != 1)` back everytime and that's a waste of git \u0026 svn storage. [Relevant](https://github.com/WeblateOrg/weblate/commit/56ee242b2c73aa1b892693c44d05c715b51832dd#diff-f45fc79cca287d720000daa62524df92)\n  ```\n  psql\n  UPDATE lang_plural SET formula='(n != 1)' WHERE formula='n != 1'\n  ```\n\n#### Importing components to Weblate\n\nEach PO file will be a component in Weblate. These components will be under a project in Webalte. `dolphin`, `discover`, `plasma-workspace` will each have their own project.\n\nFor example, let's take 'dolphin' :\n\n* Create a project named `dolphin` using Weblate web interface\n* [Setup the intermediary repo](#intermediary-repo)\n* Configure the project to have a SSH key for pushing to the intermediary git repo. If it's a GitHub repo, you can add the ssh key as a deploy key in GitHub repo with write permission.\n* From the server console, tell Weblate to import from the intermediary repo to `dolphin` project :\n  ```\n  weblate import_project dolphin 'git@github.com:FOSSersVAST/kde-pos.git' master \"pos/(?P\u003clanguage\u003e[^/]*)/dolphin/(?P\u003ccomponent\u003e[^%]*)\\.po\"\n  ```\n* Set license of components \u0026 no new languages :\n  ```\n  psql\n  UPDATE trans_component SET license='Under the same license as the package', new_lang='none';\n  ```\n* We're gonna enable\n  1. [Suggestions voting](https://docs.weblate.org/en/latest/admin/translating.html#suggestion-voting): Set suggestions for all components \u0026 vote count to 3. Users who can suggest can vote on it and get it accepted when vote reaches threshold.\n  2. Disable translation propagation (because it messess with `Your names` and `Your emails` strings)\n  ```\n  weblate shell -c 'from weblate.trans.models import Component; Component.objects.all().update(suggestion_voting=True, suggestion_autoaccept=3, allow_translation_propagation=False)'\n  ```\n* Restart Weblate\n  ```\n  .venv/lib/python3.8/site-packages/weblate/examples/celery restart\n  ```\n* Then do\n  ```\n  weblate loadpo dolphin\n  ```\n\nOptional :\n\n* [Enable Reviews](https://docs.weblate.org/en/weblate-4.7.2/workflows.html#reviews): Special reviewer users can be assigned to accept suggestions and mark strings reviewed. This setting is **per project** available in Settings -\u003e Workflow.\n\n* Make project suggestion-review based. Go to Weblate, project page -\u003e Users :\n  * Project Access Control : Protected\n\n  With this, you will have to specifically allow users to submit suggestions. Registered users can't submit suggestions by default.\n\nOr you can just disable public registration and allow specific users only.\n\n#### Social Auth\n* [Follow this](https://docs.weblate.org/en/latest/admin/auth.html)\n* Get API key \u0026 Secret, store in `.env` :\n  ```\n  SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=''\n  SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET=''\n  ```\n\n## Intermediary Repo\n\n### Syncing With KDE Upstream\n\nThis is done in 2 processes (see the diagram at the end) :\n\n1. \"Weblate Sync Process\"\n2. \"Merge Process\"\n\nWeblate Sync Process :\n\n* Go to Weblate web interface -\u003e Repository Maintenance. Click `Commit` \u0026 `Push` buttons, one after the other.\n\n  If there's any merge conflict, fix it in the repo on server. The git folder on repo will be at `data/vcs/\u003cname\u003e`. After fixing it, do a `git pull` to make sure everything's alright. And repeat this step (do Pull changes on Webalte, commit \u0026 push).\n\n* Do a `git pull` in the intermediary repo\n\n* Run\n  ```bash\n  copy-to-upstream.sh\n  ```\n  This will copy new localized strings from the recently pushed Weblate changes to KDE upstream summit repo. Note that Weblate PO files have line wrapping enabled, but summit POs does not.\n\n* In `upstream/summit/ml` folder, commit :\n  ```bash\n  svn commit -m 'Updates from Weblate'\n  ```\n  See [SVN tips](#svn-tips)\n\nMerge Process :\n\n* In **maintainer's local summit setup**, do : ([More details here](https://github.com/subins2000/kde-weblate/blob/master/SETTING-UP-SUMMIT.md#summit-next-steps))\n  ```\n  export KDEREPO=$(realpath .)\n  export PATH=$KDEREPO/trunk/l10n-support/pology/bin:$PATH\n  cd $KDEREPO\n  svn update\n  cd $KDEREPO/trunk/l10n-support\n  posummit scripts/messages.summit ml merge\n\n  # Decide whether to scatter now or not. Scatter is usually done before a release\n  posummit scripts/messages.summit ml scatter\n\n  svn commit $KDEREPO/trunk/l10n-support/ml $KDEREPO/branches/stable/ $KDEREPO/trunk/l10n-kf5/ml -m 'Routine Merge \u0026 Scatter'\n  ```\n\n* In **intermediary repo**, do (this only need to be done if `posummit merge` was done in the previous step.)\n  ```\n  cd upstream/summit/templates \u0026\u0026 svn update \u0026\u0026 cd -\n\n  cd upstream/summit/ml \u0026\u0026 svn update\n  ```\n\n* Merge strings from files in `upstream/summit` folder to `pos`\n  ```bash\n  copy-from-upstream.sh\n  ```\n  The script will only merge strings of files that exists in `upstream/summit` and `pos` folder. Note that Weblate PO files have line wrapping enabled, but summit POs does not.\n\n* Commit \u0026 push\n  ```\n  git commit -a -m \"Sync with KDE Upstream\"\n  git push\n  ```\n\n* Go to Weblate web interface -\u003e Repository Maintenance and Pull.\n\nSteps till **Weblate pull changes** can be done periodically to keep Weblate POs up-to-date with upstream.\n\nBetter add a [webhook in GitHub to Weblate](https://docs.weblate.org/en/latest/admin/continuous.html#automatically-receiving-changes-from-github) so that Weblate is known of the changes automatically. Do this with the `weblate` branch.\n\n![Illutsration](https://raw.githubusercontent.com/subins2000/kde-weblate/master/sync-flow.svg)\n\n## Notes\n\n* Don't make any change directly in the intermediary repo's `upstream` folder. If doing so, make sure to update the PO file in the `pos` folder too.\n\n## SVN Tips\n\nIf you see a `?` next to files when doing `svn status`, then those files are untracked. You can track them all with :\n\n```\n# ? means file is new\n# You may wanna add new files too (this is the equivalent of git add --all) :\nsvn status | grep '?' | sed 's/^.* /svn add /' | bash\n```\n\nTo revert local changes (`git checkout`) :\n\n```\nsvn revert --recursive path\n```\n\n[git vs svn commands table](https://backlog.com/git-tutorial/reference/commands/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubins2000%2Fkde-weblate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubins2000%2Fkde-weblate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubins2000%2Fkde-weblate/lists"}