{"id":20563050,"url":"https://github.com/universalmediaserver/ums-crowdin","last_synced_at":"2025-05-09T17:33:10.596Z","repository":{"id":57729311,"uuid":"43736842","full_name":"UniversalMediaServer/ums-crowdin","owner":"UniversalMediaServer","description":null,"archived":true,"fork":false,"pushed_at":"2022-03-05T04:26:42.000Z","size":228,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-06T08:19:04.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UniversalMediaServer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-06T07:48:58.000Z","updated_at":"2024-05-04T21:57:39.000Z","dependencies_parsed_at":"2022-09-10T21:51:36.970Z","dependency_job_id":null,"html_url":"https://github.com/UniversalMediaServer/ums-crowdin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalMediaServer%2Fums-crowdin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalMediaServer%2Fums-crowdin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalMediaServer%2Fums-crowdin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalMediaServer%2Fums-crowdin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UniversalMediaServer","download_url":"https://codeload.github.com/UniversalMediaServer/ums-crowdin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253295830,"owners_count":21885706,"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":[],"created_at":"2024-11-16T04:16:07.504Z","updated_at":"2025-05-09T17:33:10.315Z","avatar_url":"https://github.com/UniversalMediaServer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UMS crowdin Maven Plugin\n\nThis plugin allows Maven projects to be translated using crowdin. It is based on [glandais' crowdin-maven plugin] (https://github.com/glandais/crowdin-maven), but has been adapted for use with the [Universal Media Server project] (https://github.com/UniversalMediaServer/UniversalMediaServer).\n\n## Configuration\n\nTo access crowdin this plugin needs a project identifier and an API key from crowdin. This is achieved by specifying a ```server``` in Maven configuration. The API key needs to be kept private, so the best place to put this is in the Maven user settings. This can be achieved by adding a server to your ```~/.m2/settings.xml``` like shown in the example below. If you don't have a ```~/.m2/settings.xml``` file, a template is provided later in this README which can be copy and pasted into an empty xml file.\n\n```xml\n\u003csettings\u003e\n\u003c!-- ... --\u003e\n  \u003cservers\u003e\n    \u003c!-- ... --\u003e\n    \u003cserver\u003e\n      \u003cid\u003ecrowdin-ums\u003c/id\u003e\n      \u003cusername\u003euniversalmediaserver\u003c/username\u003e\n      \u003cpassword\u003eAPI key\u003c/password\u003e\n    \u003c/server\u003e\n    \u003c!-- ... --\u003e\n  \u003c/servers\u003e\n  \u003c!-- ... --\u003e\n\u003c/settings\u003e\n```\n\nFurther parameters need to be configured in your project's ```pom.xml``` so that they are available when requested by the plugin. This plugin doesn't bind to any ```phases``` and must be executed manually, so the changes to the ```pom.xml``` don't affect the build process itself. Below is a typical configuration.\n\n```xml\n\u003cproject\u003e\n\u003c!-- ... --\u003e\n  \u003cbuild\u003e\n    \u003c!-- ... --\u003e\n    \u003cpluginManagement\u003e\n      \u003c!-- ... --\u003e\n      \u003cplugins\u003e\n        \u003c!-- ... --\u003e\n        \u003cplugin\u003e\n          \u003cgroupId\u003ecom.ums.maven\u003c/groupId\u003e\n          \u003cartifactId\u003eums-crowdin-maven-plugin\u003c/artifactId\u003e\n          \u003cversion\u003eLATEST\u003c/version\u003e   \n          \u003cconfiguration\u003e\n            \u003cproject\u003e${project}\u003c/project\u003e\n            \u003clanguageFilesFolder\u003e${project.basedir}/src/main/resources/i18n\u003c/languageFilesFolder\u003e\n            \u003cdownloadFolder\u003e${project.basedir}/extras/crowdin\u003c/downloadFolder\u003e\n            \u003cstatusFile\u003e${project.basedir}/src/main/resources/languages.properties\u003c/statusFile\u003e\n            \u003ccrowdinServerId\u003ecrowdin-ums\u003c/crowdinServerId\u003e\n            \u003cpushFileName\u003emessages.properties\u003c/pushFileName\u003e\n            \u003cpushFileTitle\u003eUniversal Media Server\u003c/pushFileTitle\u003e\n            \u003cprojectName\u003eUniversal Media Server\u003c/projectName\u003e\n          \u003c/configuration\u003e\n        \u003c/plugin\u003e\n        \u003c!-- ... --\u003e\n      \u003c/plugins\u003e\n      \u003c!-- ... --\u003e\n    \u003c/pluginManagement\u003e\n    \u003c!-- ... --\u003e\n  \u003c/build\u003e\n  \u003c!-- ... --\u003e\n\u003c/project\u003e\n```\n\n## Parameter description\n\n* ```languageFilesFolder``` - The folder where the translation ```.properties``` files are located.\n* ```downloadFolder``` - A temporary folder used to store the files downloaded from crowdin.\n* ```statusFile``` - The full path to the ```.properties``` file where the translation status should be written.\n* ```crowdinServerId``` - The ```id``` of the Maven configured ```server``` to be used by the plugin for crowdin authentication.\n* ```pushFileName``` - The name of the file located in ```languageFilesFolder``` that is the _base language_ file that should be uploaded to crowdin during ```push```.\n* ```pushFileTitle``` - The title to be associated with ```pushFileName``` on crowdin.\n* ```projectName``` - The crowdin project name. To avoid pushing the wrong file to crowdin, this must match both the ```pom.xml``` project name and the crowdin project name for the given crowdin project identifier for ```push``` to be executed.\n* ```rootBranch``` - The git branch that should be considered root on crowdin (that is, not exist in a branch folder). The default value is ```master```. This parameter can be specified in ```pom.xml```, from the command line with ```-DrootBranch=``` or left to it's default. Any git branch not matching this parameter will push to and fetch from a branch folder at crowdin.\n\n## Using the plugin\n\nGiven that the parameters are configured correctly, you can execute a goal with:\n\n```mvn ums-crowdin:\u003cgoal\u003e [-D\u003cproperty\u003e=\u003cvalue\u003e]```\n\nThis plugin requires git to be installed to work, and will automatically look up the current git branch and use that as the crowdin branch unless the current git branch matches to ```rootBranch``` parameter. If no git branch is found (e.g. checked out to a tag) all goals but ```apply``` will fail. For further information about versions management and branches on crowdin, see the [crowdin documentation] (https://support.crowdin.com/articles/versions-management/).\n\nThe goals are explained below:\n\n### Pushing strings for translation to crowdin\n\n*Goal* | *Command* | *Description*\n---- | ------- | -----------\n**push** | ```mvn ums-crowdin:push -Dconfirm=true``` | Upload the _base language_ file to on crowdin. Any strings already on crowdin that's missing in the uploaded file is deleted from crowdin with all corresponding translations. Because of this, an extra argument ```confirm=true``` is required for ```push```.\n\n### Getting translations from crowdin\n\n*Goal* | *Command* | *Description*\n---- | ------- | -----------\n**build** | ```mvn ums-crowdin:build``` | Ask crowdin to build a downloadable zip file containing all the latest translations. Unpaid projects can only build once every 30 minutes via the API, but it's possible to build from the crowdin web interface at any time. The API replies with status ```skipped``` both if there are no changes since the last build and if the previous build was less than 30 minutes ago, so there's no way to tell the two apart.\n**fetch** | `mvn ums-crowdin:fetch` | Download and extract the last built zip file from crowdin to ```downloadFolder```.\n**apply** | `mvn ums-crowdin:apply` | Copy the downloaded files from ```downloadFolder``` and into their intended locations in accordance with ```languageFilesFolder``` and ```statusFile```.\n**pull** | ```mvn ums-crowdin:pull``` | Perform ```build```, ```fetch``` and ```apply``` in sequence. This is a convenience goal combining the individual steps to get the latest translations from crowdin copied into your local project.\n\n## ```settings.xml``` template\n\nIf you're missing the file ```~/.m2/settings.xml```, you can copy and paste the template below:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003csettings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd\"\u003e\n\t\u003cpluginGroups\u003e\n\t\u003c/pluginGroups\u003e\n\t\u003cproxies\u003e\n\t\u003c/proxies\u003e\n\t\u003cservers\u003e\n\t\t\u003cserver\u003e\n\t\t\t\u003cid\u003ecrowdin-ums\u003c/id\u003e\n\t\t\t\u003cusername\u003euniversalmediaserver\u003cusername\u003e\n\t\t\t\u003cpassword\u003eAPI key\u003c/password\u003e\n\t\t\u003c/server\u003e\n\t\u003c/servers\u003e\n\t\u003cmirrors\u003e\n\t\u003c/mirrors\u003e\n\t\u003cprofiles\u003e\n\t\u003c/profiles\u003e\n\u003c/settings\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversalmediaserver%2Fums-crowdin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funiversalmediaserver%2Fums-crowdin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversalmediaserver%2Fums-crowdin/lists"}