Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Host all translations in one place #7

Open
ojack opened this issue Mar 6, 2022 · 3 comments
Open

Host all translations in one place #7

ojack opened this issue Mar 6, 2022 · 3 comments

Comments

@ojack
Copy link
Member

ojack commented Mar 6, 2022

I am thinking it could be useful to host all of the translations within the hydra-docs repo (or possibly somewhere else), and then load them directly as raw json from github, such as in the i18next extended example: https://jsfiddle.net/jamuhl/ferfywyf/525/

Pros:

  • possible to edit text and translations without rebuilding and recompiling editor and website, as it would dynamically load each time
  • could possibly be easier to preview translations within various contexts.. i.e. using a url parameter pointing to a specific translation file could make it possible to load the page using that translation file

Cons:

  • might be a little bit slower?
  • in some cases might be harder to preview in context(?)
@micuat
Copy link
Member

micuat commented Mar 6, 2022

would it be like checking the URI and if it's localhost, load json locally and otherwise (i.e., hydra.ojack.xyz), load from github?

but it might not work for hydra-docs because docsify has to load markdown files. maybe - we can point docsify source to raw github and docsify will load files from there... I need to test it

@micuat
Copy link
Member

micuat commented Mar 6, 2022

I tried this locally - the root (README) loads the one on github but other pages are still pointing to the local path 😢

window.$docsify = {
  auto2top: true,
  loadSidebar: true,
  // relativePath: true,
  subMaxLevel: 3,
  homepage: 'https://raw.githubusercontent.com/hydra-synth/hydra-docs/main/README.md',
  basepath: 'https://raw.githubusercontent.com/hydra-synth/hydra-docs/main/',
  name: "Hydra",
  repo: "ojack/hydra",
  plugins: [
...

@ojack
Copy link
Member Author

ojack commented Mar 18, 2022

Maybe for docsify it is okay to keep it as is, I was more thinking about storing the json translations for hydra-functions and the web editor here, as it is much more complicated to build and run those repos (requires compilation, etc).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants