{"id":16857312,"url":"https://github.com/delivrance/plate","last_synced_at":"2025-10-28T23:47:05.074Z","repository":{"id":40250901,"uuid":"248653022","full_name":"delivrance/plate","owner":"delivrance","description":"Internationalization library for Python","archived":false,"fork":false,"pushed_at":"2022-10-30T19:02:46.000Z","size":114,"stargazers_count":51,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-03T23:52:05.611Z","etag":null,"topics":["hacktoberfest","i18n","internationalization","language","localization","translation"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/plate","language":"Python","has_issues":false,"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/delivrance.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":"2020-03-20T02:44:38.000Z","updated_at":"2025-02-08T07:26:44.000Z","dependencies_parsed_at":"2023-01-20T03:04:26.206Z","dependency_job_id":null,"html_url":"https://github.com/delivrance/plate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/delivrance/plate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delivrance%2Fplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delivrance%2Fplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delivrance%2Fplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delivrance%2Fplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delivrance","download_url":"https://codeload.github.com/delivrance/plate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delivrance%2Fplate/sbom","scorecard":{"id":333153,"data":{"date":"2025-08-11","repo":{"name":"github.com/delivrance/plate","commit":"9a8308a9ce85dfb9048572491a48e8961ff4aa7d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":3,"reason":"Found 2/6 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T04:03:50.507Z","repository_id":40250901,"created_at":"2025-08-18T04:03:50.507Z","updated_at":"2025-08-18T04:03:50.507Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281533490,"owners_count":26517827,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hacktoberfest","i18n","internationalization","language","localization","translation"],"created_at":"2024-10-13T14:07:39.814Z","updated_at":"2025-10-28T23:47:05.026Z","avatar_url":"https://github.com/delivrance.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plate\n\n\u003cimg src=\"https://i.imgur.com/hZcl3uS.png\" width=\"160\" align=\"right\"\u003e\n\n\u003e Internationalization Library for Python\n\n**Plate** (**P**ython trans**late**) is an i18n library for Python that gives your application the ability to\nspeak many languages. It is designed to be simple and straightforward to use for **developers** and easy for\n**translators**.\n\n## Features\n\n- Translations based on JSON files\n- Interpolated translations\n- Pluralization\n- Emoji\n\n## Installing\n\n``` shell\n$ pip3 install plate\n```\n\n## Setup\n\nPlate is not going to perform any translation; what it does, instead, is simply providing a way to manage\nalready-translated phrases so that they can be easily accessed from your application code.\n\nThese translated phrases are kept in JSON files stored in a folder inside the application working directory and\norganized by their respective language codes. The JSON keys are in common to all translations and the values\nof each contain the translated phrases.\n\n1. Create a new `locales` folder in your working directory to store translation files.\n2. Put files named after their language codes: `en_US.json`, `it_IT.json`, and so on. All available language codes can\n   be found [here](plate/languages.py).\n3. Start adding new phrases and translations. Here's an example for `en_US.json` and `it_IT.json`\n    ``` json\n    {\n        \"hello\": \"Hello\", \n        \"morning\": \"Good morning, {name}\",\n        \"drink\": \"Let's drink :SAKE: together\",\n        \"apples\": \"No apples | One apple | {count} apples\"\n    }\n    ```\n    ``` json\n    {\n        \"hello\": \"Ciao\", \n        \"morning\": \"Buongiorno, {name}\",\n        \"drink\": \"Beviamo :SAKE: insieme\",\n        \"apples\": \"Nessuna mela | Una mela | {count} mele\"\n    }\n    ```\n \n## Usage\n \n### Instantiation\n\nFirst of all, create a new `Plate` instance. Plate will automatically look for files inside the `locales` folder\nor another custom folder you pass to the *root* parameter. The default and the fallback locale is `en_US`, by default.\n\n``` python\nfrom plate import Plate\n\nplate = Plate()\n```\n\n### Translation\n\nTranslate a phrase by simply passing a key and a language code of the destination locale.\n\n``` python\nplate(\"hello\", \"it_IT\")  # Ciao\n```\n\nYou can also set a new default locale to have all subsequent translations in that language.\n\n``` python\nplate.set_locale(\"it_IT\")\nplate(\"hello\")  # Ciao\n```\n\nOr, get a translator for a given locale instead, so that the default locale will be kept unchanged.\n\n``` python\nitalian = plate.get_translator(\"it_IT\")\nitalian(\"hello\")  # Ciao\n```\n\n**Note**: The examples below will assume `plate.set_locale(\"it_IT\")` for conciseness.\n\n### Interpolation\n\nPass named arguments to interpolate your translations.\n\n``` python\nplate(\"morning\", name=\"Dan\")  # Buongiorno, Dan\n```\n\n### Emoji\n\nEmoji can be added with `:EMOJI_NAME:` inside your sources and are automatically inserted with the actual values.\nAll available emoji can be found [here](plate/emojipedia.py). You can search for, visualize them and grab their\nnames at https://emojipedia.org/.\n\n``` python\nplate(\"drink\")  # Beviamo 🍶 insieme\n```\n\n### Pluralization\n\nPluralization is done by keeping all the plural cases separated by a pipe `|` (by default, customizable) and by using the special interpolation\nkey `{count}`. The following example shows how to translate and pluralize a phrase for count cases of zero, one and more.\n\n``` python\nplate(\"apples\", count=0)  # Nessuna mela\nplate(\"apples\", count=1)  # Una mela\nplate(\"apples\", count=7)  # 7 mele\n```\n\n## License\n\nMIT © 2020 [Dan](https://github.com/delivrance)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelivrance%2Fplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelivrance%2Fplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelivrance%2Fplate/lists"}