{"id":19947784,"url":"https://github.com/projectfluent/fluent-web","last_synced_at":"2025-09-20T09:47:34.553Z","repository":{"id":57238989,"uuid":"142167522","full_name":"projectfluent/fluent-web","owner":"projectfluent","description":"fluent-web - simple example of a vanilla Web app using Fluent","archived":false,"fork":false,"pushed_at":"2019-08-21T22:42:35.000Z","size":33,"stargazers_count":20,"open_issues_count":1,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-08T16:41:14.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/projectfluent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-07-24T14:08:51.000Z","updated_at":"2023-10-01T01:23:50.000Z","dependencies_parsed_at":"2022-09-05T07:51:21.992Z","dependency_job_id":null,"html_url":"https://github.com/projectfluent/fluent-web","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/projectfluent/fluent-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectfluent%2Ffluent-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectfluent%2Ffluent-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectfluent%2Ffluent-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectfluent%2Ffluent-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectfluent","download_url":"https://codeload.github.com/projectfluent/fluent-web/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectfluent%2Ffluent-web/sbom","scorecard":{"id":746618,"data":{"date":"2025-08-11","repo":{"name":"github.com/projectfluent/fluent-web","commit":"bc04cba69c6cc7df0386a1b36b29ebeeb245a851"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 2/24 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 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"}}]},"last_synced_at":"2025-08-22T18:57:21.925Z","repository_id":57238989,"created_at":"2025-08-22T18:57:21.925Z","updated_at":"2025-08-22T18:57:21.925Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276077895,"owners_count":25581305,"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-09-20T02:00:10.207Z","response_time":63,"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":[],"created_at":"2024-11-13T00:37:21.943Z","updated_at":"2025-09-20T09:47:34.462Z","avatar_url":"https://github.com/projectfluent.png","language":"JavaScript","readme":"# @fluent/web\n\n`@fluent/web` is a runtime polyfill that binds `Fluent` and `FluentDOM` into\na vanilla Web platform (HTML, DOM, JS).\n\n## Installation\n\n`@fluent/web` provides a glue code that is executed at runtime to construct\n`DOMLocalization`, bind it to `document.l10n`, perform initial document\ntranslation and set the event listeners and MutationObserver.\n\nThe result `fluent-web.js` file should be included in the HTML file\nand any code executing after it will have access to the FluentWeb API.\n\n\n## Quick start\n\nClone and run the\n[projectfluent/fluent-web](https://github.com/projectfluent/fluent-web)\nrepository to see the examples:\n\n```sh\ngit clone https://github.com/projectfluent/fluent-web\ncd fluent-web\nnpm install\nnpm start\nopen http://127.0.0.1:8080/examples/simple.html\n```\n\n\n## How to use\n\nThe primary access point is the `document.l10n` object of class\n`DOMLocalization`. It is already constructed based on the resources\nlinked from the document and localized into languages negotiated based\non the available languages from the `\u003cmeta\u003e` tag and languages\nrequested via `navigator.languages`.\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta name=\"defaultLanguage\" content=\"en-US\"\u003e\n    \u003cmeta name=\"availableLanguages\" content=\"en-US, fr\"\u003e\n    \u003clink rel=\"localization\" href=\"locales/{locale}/main.ftl\"\u003e\n    \u003clink rel=\"localization\" href=\"locales/{locale}/head.ftl\"\u003e\n    \u003cscript defer src=\"./src/fluent-web.js\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1 data-l10n-id=\"hello-world\"/\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n```javascript\n\nfunction showMessage() {\n  let msg = await document.l10n.formatValue('confirm-msg')\n  alert(msg);\n}\n\nlet h1 = document.querySelector('h1');\ndocument.l10n.setAttributes(h1, 'welcome', { user: 'Anna' });\n```\n\n## Learn more\n\nFind out more about Project Fluent at [projectfluent.org][], including\ndocumentation of the Fluent file format ([FTL][]), links to other packages and\nimplementations, and information about how to get involved.\n\n\n\n\n[projectfluent.org]: http://projectfluent.org\n[FTL]: http://projectfluent.org/fluent/guide/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectfluent%2Ffluent-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectfluent%2Ffluent-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectfluent%2Ffluent-web/lists"}