{"id":18174477,"url":"https://github.com/ThinkR-open/gemstones","last_synced_at":"2025-04-01T15:31:36.173Z","repository":{"id":69754264,"uuid":"460440298","full_name":"ThinkR-open/gemstones","owner":"ThinkR-open","description":"Make Your 'golem' App Shine","archived":false,"fork":false,"pushed_at":"2023-03-27T11:32:02.000Z","size":35,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T10:21:56.181Z","etag":null,"topics":["golemverse","hacktoberfest","hacktoberfest-accepted","hacktoberfest2022","r"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThinkR-open.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-02-17T13:09:08.000Z","updated_at":"2024-08-20T23:58:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e543e9e-633d-47e7-9bd6-97b6e1b98702","html_url":"https://github.com/ThinkR-open/gemstones","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgemstones","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgemstones/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgemstones/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fgemstones/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThinkR-open","download_url":"https://codeload.github.com/ThinkR-open/gemstones/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246662358,"owners_count":20813737,"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":["golemverse","hacktoberfest","hacktoberfest-accepted","hacktoberfest2022","r"],"created_at":"2024-11-02T16:03:07.951Z","updated_at":"2025-04-01T15:31:36.168Z","avatar_url":"https://github.com/ThinkR-open.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# gemstones\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/ThinkR-open/gemstones/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ThinkR-open/gemstones/actions/workflows/R-CMD-check.yaml)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n\u003c!-- badges: end --\u003e\n\nMake your `{golem}` based apps more beautiful with `{gemstones}`.\n\n## Installation\n\nYou can install the development version of `{gemstones}` like so:\n\n``` r\nremotes::install_github(\"thinkr-open/gemstones\")\n```\n\n## About\n\nYou're reading the doc about version : `r pkgload::pkg_version()`\n\nThis README has been compiled on the\n\n```{r}\nSys.time()\n```\n\nHere are the test \u0026 coverage results :\n\n```{r}\ndevtools::check(quiet = TRUE)\n```\n\n```{r echo = FALSE}\nunloadNamespace(\"shinipsum\")\n```\n\n```{r}\ncovr::package_coverage()\n```\n\n## How it works\n\nThe goal of `{gemstones}` is to allow you to add some JavaScript libraries to your `{golem}` based app.\n\n`{gemstones}` will automate the download and the linking of some JS libraries, but it's important to understand that __`{gemstones}` is not providing a full wrapper or widget for these libraries__.\nYou'll still have to code some elements to make it work.\n\nNote also that the functions in this package are not intended to work outside of a `{golem}` based app.\n\n## Notifyjs\n\nSkeleton for [Notifyjs](https://notifyjs.jpillora.com/) can be added with `gemstones::use_notifyjs()`.\n\nThis function will do the following:\n\n+ Download `notifyjs` from the website.\n+ Add a `notifyjs_handlers.js` file, which are shiny custom message handlesr\n+ Add `fct_notifyjs.R`, which contains `notify_success()`, `notify_warning()`, \u0026 `notify_error()`.\n+ Add tes.\n\n### How to use `notifyjs`\n\nThis JS plugin provides notifications that can be sent and customize via the R functions defined in `fct_notifyjs.R`\n\n\n## jquery-i18next\n\nSkeleton for [jquery-i18next](https://github.com/i18next/jquery-i18next) can be added with `gemstones::use_jqueryi18next()`.\n\nThis function will do the following:\n\n+ Download `i18next` \u0026 `jquery-i18next` from a CDN.\n+ Add a `i18n_locales.json` file, which you can use to add your translation.\n+ Add a `i18n_shiny.js` file, which will load the lib \u0026 data when your shiny app launched.\n+ Add a `i18n_handlers.js` file, which are shiny custom message handlesr\n+ Add `fct_i18n.R`, which contains `with_i18n()`, `localize()`, `change_language()` \u0026 `get_language()`.\n+ Add test for `with_i18n()`.\n\n### How to use `jquery-i18next`\n\nThis JS plugin provides client-side translation of the UI elements.\n\nTo define a translation, you need to follow this pattern:\n\n```r\ngemstones::use_jqueryi18next()\n```\n\n```r\n# Add a i18n tag to your element\nh1(\"Hello\") |\u003e with_i18n(\"main_title\")\n```\n\n```json\n{\n    \"en\": {\n        \"translation\": {\n            \"main_title\": \"Hello World\"\n        }\n    },\n    \"fr\": {\n        \"translation\": {\n            \"main_title\": \"Wesh la famille\"\n        }\n    }\n}\n```\n\nThen at app launch, this title will be translated.\n\nTo switch from one language to the other, you can use one of these two technics:\n\n+ Run code in JavaScript:\n\n```javascript\n//  Set the language\ni18next.changeLanguage('fr')\n// Localize\n$(\"html\").localize()\n```\n\n+ Run code in R:\n\n```r\nchange_language(\"fr\")\nlocalize(\"html\")\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThinkR-open%2Fgemstones","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThinkR-open%2Fgemstones","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThinkR-open%2Fgemstones/lists"}