{"id":17308773,"url":"https://github.com/guerinoni/qtsconverter","last_synced_at":"2025-04-10T01:11:43.882Z","repository":{"id":37823315,"uuid":"217880587","full_name":"guerinoni/qTsConverter","owner":"guerinoni","description":"A simple tool to convert qt translation file (ts) to other format (xlsx / csv) and vice versa","archived":false,"fork":false,"pushed_at":"2024-11-18T13:11:36.000Z","size":793,"stargazers_count":45,"open_issues_count":16,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T01:11:39.277Z","etag":null,"topics":["conversion","convert","converter","csv","hacktoberfest","qt","qt-translation","translation","translation-files","translation-management","ts","xlsx"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guerinoni.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-27T16:08:42.000Z","updated_at":"2025-04-08T11:29:31.000Z","dependencies_parsed_at":"2024-05-28T09:40:27.598Z","dependency_job_id":"463c0461-8075-4774-ba6c-714b62b99378","html_url":"https://github.com/guerinoni/qTsConverter","commit_stats":{"total_commits":265,"total_committers":15,"mean_commits":"17.666666666666668","dds":0.5584905660377358,"last_synced_commit":"e828f0d54125b0b701058390c077ed3a77224e94"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2FqTsConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2FqTsConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2FqTsConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guerinoni%2FqTsConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guerinoni","download_url":"https://codeload.github.com/guerinoni/qTsConverter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137888,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["conversion","convert","converter","csv","hacktoberfest","qt","qt-translation","translation","translation-files","translation-management","ts","xlsx"],"created_at":"2024-10-15T12:05:59.230Z","updated_at":"2025-04-10T01:11:43.861Z","avatar_url":"https://github.com/guerinoni.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qTsConverter\r\n![linux](https://github.com/guerinoni/qTsConverter/workflows/linux/badge.svg?branch=master)\r\n![macos](https://github.com/guerinoni/qTsConverter/workflows/macos/badge.svg?branch=master)\r\n![w10](https://github.com/guerinoni/qTsConverter/workflows/w10/badge.svg)\r\n![GitHub](https://img.shields.io/github/license/guerinoni/qTsConverter)\r\n![GitHub stars](https://img.shields.io/github/stars/guerinoni/qTsConverter)\r\n\r\nThis tool was born to convert `.ts` file of Qt translation in other format more\r\neditable using an office suite.\r\n\r\n## Features\r\n\r\n- conversion `.ts` -\u003e `.csv` (and vice-versa)\r\n- conversion `.ts` -\u003e `.xlsx` (and vice-versa)\r\n- automatically detect conversion type\r\n- convert multiple file in input\r\n\r\n## Usage (GUI version)\r\n- browse input filename (or multiple input)\r\n- choose output filename (or folder in case of multi input)\r\n- click convert button\r\n\r\n### To generate output.csv\r\n![example conversion ts -\u003e csv](./doc/Screenshot.png)\r\n\r\n## Usage (CLI version)\r\nYou can check the version with `qTsConverter --version`.\r\n\r\nPerform a conversion:\r\n```bash\r\nqTsConverter ../../tests/files/scenario_multiline.ts ./lol.csv\r\n```\r\nTo create an excelfile without version information / without file locations,\r\nthe cli can be invoked with two command line switches.\r\n```bash\r\nqTsConverter --no-version --no-location ../../tests/files/scenario_multiline.ts ./lol.xlsx\r\n```\r\nTo create an excel file for each ts file in a folder,\r\na bash script can be invoked.\r\n```bash\r\n./scripts/ts-to-xlsx.sh /path/to/ts-files ./build/src/\r\n```\r\nTo create a ts file for each excel file in a folder,\r\na bash script can be invoked.\r\n```bash\r\n./scripts/xlsx-to-ts.sh /path/to/xlsx-files ./build/src/\r\n```\r\n\r\n\r\n\r\n## Build\r\n\r\nSimple build\r\n```bash\r\nmkdir build\r\ncd build\r\ncmake ..\r\ncmake --build .\r\n```\r\n\r\nSimple build only CLI\r\n```bash\r\nmkdir build\r\ncd build\r\ncmake -DBUILD_CLI:BOOL=ON -DCMAKE_PREFIX_PATH=/home/guerra/Qt/5.15.2/gcc_64/ ..\r\ncmake --build .\r\n```\r\nor alternatively use script\r\n```bash\r\ncd scripts\r\n./compile-cli.sh\r\n```\r\n\r\n\r\n### Linux\r\nCompile from source and install:\r\n\r\n```\r\n$ git clone --recursive https://github.com/guerinoni/qTsConverter.git\r\n$ cd scripts/\r\n$ ./compile.sh\r\n$ cd ../../build\r\n$ sudo make install\r\n```\r\n\r\nIf qTsConverter was installed with ``-DCMAKE_INSTALL_PREFIX=/usr/local`` (like\r\n``compile.sh`` does) the shell variable ``LD_LIBRARY_PATH`` should contain\r\n``/usr/local/lib`` and ``/usr/local/bin`` should be in the ``PATH`` variable.\r\nThis allows to locate libraries that qTsConverter depends on and run it from any\r\npath.\r\n\r\nTo be able to open the output file and the output directory, ``xdg-mime`` must\r\nbe set for the following filetypes:\r\n\r\n- ``application/excel``\r\n- ``application/csv``\r\n- ``text/csv``\r\n- ``text/xml``\r\n\r\nFor example:\r\n\r\n```bash\r\nxdg-mime default libreoffice-calc.desktop application/csv\r\n```\r\n\r\n### Windows\r\nCompile from source and install:\r\n\r\n```pwsh\r\ncmake -DCMAKE_BUILD_TYPE=Release -S . -B build_win_release\r\ncmake --build build_win_release --parallel --config Release\r\n```\r\n\r\nAs Administrator\r\n```pwsh\r\ncmake --install build_win_release\r\n```\r\n\r\n##\r\nExample of supported TS file and its features (for reference see https://doc.qt.io/qt-6/linguist-ts-file-format.html):\r\n\r\n```xml\r\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\r\n\u003c!DOCTYPE TS\u003e\r\n\u003cTS version=\"2.1\" language=\"de\" sourcelanguage=\"en\"\u003e\r\n\u003ccontext\u003e\r\n    \u003cname\u003econtext a\u003c/name\u003e\r\n    \u003cmessage id=\"my-id\"\u003e\r\n        \u003clocation filename=\"../dir/file.ui\" line=\"26\"/\u003e\r\n        \u003csource\u003esource example\u003c/source\u003e\r\n\t\t\u003ccomment\u003ecomment example\u003c/comment\u003e\r\n\t\t\u003cextracomment\u003eextra comment example\u003c/extracomment\u003e\r\n\t\t\u003ctranslatorcomment\u003etranslator comment example\u003c/translatorcomment\u003e\r\n        \u003ctranslation\u003etranslation example\u003c/translation\u003e\r\n\t\t\u003ctranslation type=\"unfinished\"\u003e\u003c/translation\u003e\r\n\t\t\u003ctranslation type=\"vanished\"\u003eexample 1: type is optional and maximum one type\u003c/translation\u003e\r\n\t\t\u003ctranslation type=\"obsolete\"\u003eexample 2\u003c/translation\u003e\r\n    \u003c/message\u003e\r\n\u003c/context\u003e\r\n\u003c/TS\u003e\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguerinoni%2Fqtsconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguerinoni%2Fqtsconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguerinoni%2Fqtsconverter/lists"}