{"id":19777452,"url":"https://github.com/ilib-js/ilib-loctool-mrkdwn","last_synced_at":"2025-04-30T19:32:29.284Z","repository":{"id":250376612,"uuid":"830216458","full_name":"iLib-js/ilib-loctool-mrkdwn","owner":"iLib-js","description":"A loctool plugin that can parse Slack mrkdwn messages in a json file","archived":true,"fork":false,"pushed_at":"2024-11-12T13:05:07.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T02:24:38.891Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iLib-js.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":"2024-07-17T20:43:29.000Z","updated_at":"2024-11-21T22:03:57.000Z","dependencies_parsed_at":"2024-09-14T13:31:36.470Z","dependency_job_id":null,"html_url":"https://github.com/iLib-js/ilib-loctool-mrkdwn","commit_stats":null,"previous_names":["ilib-js/ilib-loctool-mrkdwn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-mrkdwn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-mrkdwn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-mrkdwn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-mrkdwn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iLib-js","download_url":"https://codeload.github.com/iLib-js/ilib-loctool-mrkdwn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769500,"owners_count":21640915,"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-12T05:24:56.211Z","updated_at":"2025-04-30T19:32:29.279Z","avatar_url":"https://github.com/iLib-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003e :warning: **Deprecation Notice** :warning:\n\u003e This repository has been deprecated. Please use the corresponding package from the [iLib-js monorepo](https://github.com/iLib-js/ilib-mono) instead.\n\n# ilib-loctool-mrkdwn\n\nIlib loctool plugin to parse and localize the slack-flavored markdown\nknown as \"mrkdwn\" encoded in js files.\n\n## File Format\n\nA slack application can encode its strings as a simple js file with\nthe properties being the unique ids of the strings, and the values\nbeing strings in mrkdwn format.\n\nExample file:\n\n```javascript\nexport default messages = {\n    // this is a translator's comment that explains the first string\n    \"unique id 1\": \"This is a *mrkdwn* string!\",\n\n    // this is a translator's comment that explains the second string\n    \"unique id 2\": \"This _is_ also a \u003chttp://example.com|mrkdwn string\u003e.\"\n};\n```\n\n## Escapes\n\nWhenever there is syntax in the mrkdwn that translators should\nnot touch, this plugin converts them into xml-like components.\n\n```\nThis is *bold* and _italic_ text.\n```\n\nBecomes the string:\n\n```\nThis is \u003cc0\u003ebold\u003c/c0\u003e and \u003cc1\u003eitalic\u003c/c1\u003e text.\n```\n\nfor the translators.\n\nIn this way, translators only have to deal with xml-like syntax\n(which they are probably already familiar with) instead of the\nvarious methods of marking up text using mrkdwn.\n\nEach component is numbered so that the translators can switch\nthem around as appropriate for the grammar of their target\nlanguage.\n\n## Code\n\nSnippets of code are not processed. If there is an inline\nsnippet of code, it will be considered part of the surrounding\ntext and represented as an XML-like component. The text of\nthe inline snippet will be put into the comments of the\nextracted string so that the translator knows what it is.\n\nExample:\n\n```\nThere are many instances of `numcount` used in the code.\n```\n\nbecomes:\n\n```\nThere are many instances of \u003cc0/\u003e used in the code.\n```\n\nfor the translators.\n\nInline snippets are represented with self-closing XML tags.\n\n## Links, References, and Footnotes\n\nYou can have references and links in your mrkdwn as normal:\n\n```\nSee the code on \u003chttps://github.com/ilib-js/ilib-loctool-mrkdwn|github\u003e.\n```\n\nwhich becomes:\n\n```\nSee the code on \u003cc0\u003egithub\u003c/c0\u003e.\n```\n\nfor the translators.\n\n## Mappings\n\nThis plugin supports mappings:\n\n```json\n{\n  [...]\n  \"settings\": {\n    \"mrkdwn\": {\n      \"mappings\": {\n        \"**/foobar.js\": {\n          \"template\": \"[dir]/[basename]_[locale].[extension]\",\n          \"localeMap\": {\n            \"fr-FR\": \"fr\",\n            \"ja-JP\": \"ja\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nThe mappings allow you to match a particular path name and apply particular\nsettings to that path, such as an output path name template. The mappings are\nminimatch style.\n\nThe template follows the syntax for path name templates defined in the\nthe [loctool](https://github.com/iLib-js/loctool/blob/development/lib/utils.js#L1881)\nitself.\n\nThe localeMap setting specifies the mapping between locales that are used\ninternally in the plugin, and the output locale that should be used for constructing\nthe file name of output files.\n\n## Output Style\n\nThe output style of js file can be controlled via the `outputStyle` setting. This setting\nallows you to output the localized strings in commonjs format or as an ESM module.\n\nExample configuration in your loctool config file:\n\n```json\n{\n    [...]\n    \"settings\": {\n        \"mrkdwn\": {\n            \"outputStyle\": \"esm\"\n        }\n    }\n}\n```\n\nValid values for the `outputStyle` setting are:\n- `commonjs`\n- `esm` (default)\n\n## License\n\nThis plugin is licensed under Apache2. See the [LICENSE](./LICENSE)\nfile for more details.\n\n## Release Notes\n\n### 1.0.0\n\n- Initial release\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-loctool-mrkdwn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filib-js%2Filib-loctool-mrkdwn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-loctool-mrkdwn/lists"}