{"id":23215497,"url":"https://github.com/emilymclean/pkl-strings","last_synced_at":"2025-04-05T13:42:50.863Z","repository":{"id":234866382,"uuid":"789652940","full_name":"emilymclean/pkl-strings","owner":"emilymclean","description":"Generate platform specific string/translation files from a single source file. Currently supports iOS and Android.","archived":false,"fork":false,"pushed_at":"2024-11-17T13:04:24.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T09:50:48.964Z","etag":null,"topics":["android","ios","pkl"],"latest_commit_sha":null,"homepage":"","language":"Pkl","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/emilymclean.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-21T07:00:19.000Z","updated_at":"2024-11-17T13:03:46.000Z","dependencies_parsed_at":"2024-05-01T04:23:55.337Z","dependency_job_id":"d1c84d45-ffe3-4a55-aab6-84bf03e62968","html_url":"https://github.com/emilymclean/pkl-strings","commit_stats":null,"previous_names":["benmmclean/pklstrings","benmmclean/pkl-strings","emilymclean/pkl-strings"],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilymclean%2Fpkl-strings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilymclean%2Fpkl-strings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilymclean%2Fpkl-strings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilymclean%2Fpkl-strings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emilymclean","download_url":"https://codeload.github.com/emilymclean/pkl-strings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345789,"owners_count":20924098,"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":["android","ios","pkl"],"created_at":"2024-12-18T20:17:00.984Z","updated_at":"2025-04-05T13:42:50.834Z","avatar_url":"https://github.com/emilymclean.png","language":"Pkl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pkl-strings\n\nGenerate platform specific string/translation files from a single source file. Currently supports iOS and Android.\n\n## Usage\n![Stable](https://img.shields.io/github/v/release/BenMMcLean/pkl-strings?label=Stable)\n![Preview](https://img.shields.io/github/v/release/BenMMcLean/pkl-strings?label=Preview\u0026include_prereleases)\n\nMake a new source file amending `strings.pkl` and override `localizable`:\n```pkl\namends \"package://emilym.cl/pkl-strings/pkl-strings@\u003cversion\u003e.zip\"\n\nlocalizable = new Localizable {\n    languages = new Listing {\n        new Language {\n            code = \"en\"\n            strings = new Listing {\n                new SingleResourceString {\n                    name = \"single\"\n                    value = \"TestValue\"\n                },\n                new QuantityResourceString {\n                    name = \"quantity_positional\"\n                    options = new Listing {\n                        new QuantityOption {\n                            quantity = \"one\"\n                            value = \"%d Thing\"\n                        }\n                        new QuantityOption {\n                            quantity = \"other\"\n                            value = \"%d Things\"\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n```\n\nThis file can then be exported as an Android `strings.xml` and iOS `Localizable.xcstrings` using the command\n```bash\npkl eval file.pkl -m .\n```\n\nThis will automatically render the localized strings into an `android` and `apple` directory for Android strings and iOS strings respectively.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilymclean%2Fpkl-strings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femilymclean%2Fpkl-strings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilymclean%2Fpkl-strings/lists"}