mirror of
https://github.com/hydra-synth/hydra.git
synced 2025-12-16 11:50:00 +01:00
added brazilian portuguese and indonesian translations
This commit is contained in:
23
README.md
23
README.md
@@ -228,24 +228,12 @@ synth = new Tone.Synth().toDestination();
|
||||
synth.triggerAttackRelease("C4", "8n");
|
||||
```
|
||||
## Running locally
|
||||
To run locally, you must have nodejs, yarn and npm installed. Install node and npm from: https://nodejs.org/en/
|
||||
|
||||
To clone the repo, you must also clone the repos added as submodules, i.e.:
|
||||
```
|
||||
git clone --recurse-submodules https://github.com/hydra-synth/hydra.git
|
||||
```
|
||||
|
||||
To install dependencies, make sure to enter the hydra source code directory from the command line:
|
||||
```
|
||||
cd hydra
|
||||
```
|
||||
|
||||
|
||||
Install yarn from the command line
|
||||
To run locally, you must have nodejs, yarn and npm installed. Install node and npm from: https://nodejs.org/en/. Once you have node and npm installed, you can install yarn globally by running the following from the command line:
|
||||
```
|
||||
npm install --global yarn
|
||||
```
|
||||
open terminal and enter directory
|
||||
|
||||
To run, open terminal and enter the directory of the hydra source code:
|
||||
```
|
||||
cd hydra
|
||||
```
|
||||
@@ -261,6 +249,11 @@ go to https://localhost:8000 in the browser
|
||||
|
||||
### Using submodules
|
||||
|
||||
If you would like to run all projects on the hydra website (such as the documentation, garden, and api documentation), you must also clone the repos added as submodules, i.e.:
|
||||
```
|
||||
git clone --recurse-submodules https://github.com/hydra-synth/hydra.git
|
||||
```
|
||||
|
||||
To add current submodules to an existing checked-out version of the repo:
|
||||
```
|
||||
git submodule update --init
|
||||
|
||||
Submodule frontend/hydra-docs updated: 4cd2a6d465...ef029ce20d
Submodule frontend/hydra-functions updated: 32cb7f0522...b12d49227a
@@ -50500,7 +50500,7 @@ const i18nextBrowserLanguageDetector = require('i18next-browser-languagedetector
|
||||
|
||||
const languageResources = require('./text-elements.js')
|
||||
|
||||
const availableLanguages = ['ja', 'es', 'ar'] // localizations available in repository at /hydra-synth/l10n
|
||||
const availableLanguages = ['ja', 'es', 'ar', 'id', 'pt-br'] // localizations available in repository at /hydra-synth/l10n
|
||||
const languagePath = (lang) => `https://raw.githubusercontent.com/hydra-synth/l10n/main/${lang}/editor.json`
|
||||
|
||||
i18next
|
||||
@@ -50549,7 +50549,11 @@ module.exports = function store(state, emitter) {
|
||||
})
|
||||
|
||||
function updateAvailableLanguages() {
|
||||
Object.keys(languageResources).forEach((key) => languages[key] = i18next.getFixedT(key)('language-name'))
|
||||
Object.keys(languageResources).forEach((key) => {
|
||||
// for some reason, 'pt-br' was not working, use just pt instead
|
||||
const k = key.split('-')[0]
|
||||
languages[k] = i18next.getFixedT(k)('language-name')
|
||||
})
|
||||
|
||||
state.translation = {
|
||||
t: i18next.t,
|
||||
@@ -50574,7 +50578,13 @@ module.exports = function store(state, emitter) {
|
||||
}
|
||||
}).then(json => {
|
||||
// console.log(json)
|
||||
i18next.addResourceBundle(lang, 'translation', json)
|
||||
window.i18n = i18next
|
||||
console.log('adding language', lang, json)
|
||||
|
||||
// for some reason, 'pt-br' was not working, use just pt instead
|
||||
const k = lang.split('-')[0]
|
||||
i18next.addResourceBundle(k, 'translation', json)
|
||||
|
||||
const languages = {}
|
||||
updateAvailableLanguages()
|
||||
emitter.emit('render')
|
||||
@@ -51444,7 +51454,7 @@ module.exports = function mainView(state, emit) {
|
||||
<div id="info-container" class="${state.showInfo ? "" : "hidden"}" style="direction:${textDirection}">
|
||||
<div id="modal">
|
||||
<div id="modal-header" style="opacity:${state.showUI === true? 1: 0}">
|
||||
${state.showInfo && langArray.length > 1 ? html`<div style="display:flex">${langArray.map(([key, val]) => html`
|
||||
${state.showInfo && langArray.length > 1 ? html`<div style="display:flex;flex-wrap:wrap">${langArray.map(([key, val]) => html`
|
||||
<div class="language-select" onclick=${() => emit('set language', key)}>${val}</div>
|
||||
`)}</div>` : html`<div></div>` }
|
||||
${toolbar(state, emit)}
|
||||
|
||||
@@ -79,7 +79,7 @@ transition: width 1s;
|
||||
|
||||
#modal-header {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
/* height: 40px; */
|
||||
border: 1px solid white;
|
||||
margin: 0px;
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<meta name="twitter:image" content="https://cdn.glitch.com/9c3a06ab-0731-42ca-a1a3-3a249825d08f%2FScreen%20Shot%202018-06-24%20at%204.47.49%20PM.png?1531889983803">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js" defer></script>
|
||||
<!-- <script src="./bundle.js?1.2we2ajk" defer></script> -->
|
||||
<script src="./bundle.min.js?1.3.7" defer></script>
|
||||
<script src="./bundle.js?1.2we2ajk" defer></script>
|
||||
<!-- <script src="./bundle.min.js?1.3.7" defer></script> -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Chivo:300,400,700" rel="stylesheet">
|
||||
<link rel="stylesheet" href="./css/fontawesome.css">
|
||||
<link rel="stylesheet" href="./css/codemirror.css">
|
||||
|
||||
@@ -4,7 +4,7 @@ const i18nextBrowserLanguageDetector = require('i18next-browser-languagedetector
|
||||
|
||||
const languageResources = require('./text-elements.js')
|
||||
|
||||
const availableLanguages = ['ja', 'es', 'ar'] // localizations available in repository at /hydra-synth/l10n
|
||||
const availableLanguages = ['ja', 'es', 'ar', 'id', 'pt-br'] // localizations available in repository at /hydra-synth/l10n
|
||||
const languagePath = (lang) => `https://raw.githubusercontent.com/hydra-synth/l10n/main/${lang}/editor.json`
|
||||
|
||||
i18next
|
||||
@@ -53,7 +53,11 @@ module.exports = function store(state, emitter) {
|
||||
})
|
||||
|
||||
function updateAvailableLanguages() {
|
||||
Object.keys(languageResources).forEach((key) => languages[key] = i18next.getFixedT(key)('language-name'))
|
||||
Object.keys(languageResources).forEach((key) => {
|
||||
// for some reason, 'pt-br' was not working, use just pt instead
|
||||
const k = key.split('-')[0]
|
||||
languages[k] = i18next.getFixedT(k)('language-name')
|
||||
})
|
||||
|
||||
state.translation = {
|
||||
t: i18next.t,
|
||||
@@ -78,7 +82,13 @@ module.exports = function store(state, emitter) {
|
||||
}
|
||||
}).then(json => {
|
||||
// console.log(json)
|
||||
i18next.addResourceBundle(lang, 'translation', json)
|
||||
window.i18n = i18next
|
||||
console.log('adding language', lang, json)
|
||||
|
||||
// for some reason, 'pt-br' was not working, use just pt instead
|
||||
const k = lang.split('-')[0]
|
||||
i18next.addResourceBundle(k, 'translation', json)
|
||||
|
||||
const languages = {}
|
||||
updateAvailableLanguages()
|
||||
emitter.emit('render')
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = function mainView(state, emit) {
|
||||
<div id="info-container" class="${state.showInfo ? "" : "hidden"}" style="direction:${textDirection}">
|
||||
<div id="modal">
|
||||
<div id="modal-header" style="opacity:${state.showUI === true? 1: 0}">
|
||||
${state.showInfo && langArray.length > 1 ? html`<div style="display:flex">${langArray.map(([key, val]) => html`
|
||||
${state.showInfo && langArray.length > 1 ? html`<div style="display:flex;flex-wrap:wrap">${langArray.map(([key, val]) => html`
|
||||
<div class="language-select" onclick=${() => emit('set language', key)}>${val}</div>
|
||||
`)}</div>` : html`<div></div>` }
|
||||
${toolbar(state, emit)}
|
||||
|
||||
Reference in New Issue
Block a user