Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more texts to support translations and some small fixes to Finnish translations #121

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ I've heard people say they want to fork this project for other languages and dat

## Thank you!

Many thanks to everyone who helped with the translations! @AWolf81, @Gonzalo2310, @welll, @julienmartin, @g-plane, @imbyurhan, @bahe007, @salahaa1, @proYang, @bdimitrovski, @TheElderMindseeker, @glenngijsberts, @galuhsahid, @xgebi
Many thanks to everyone who helped with the translations! @AWolf81, @Gonzalo2310, @welll, @julienmartin, @g-plane, @imbyurhan, @bahe007, @salahaa1, @proYang, @bdimitrovski, @TheElderMindseeker, @glenngijsberts, @galuhsahid, @xgebi, @sjarva, @minna-xD

## Build Setup

Expand Down
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<LocaleSwitcher/>
<main>
<section class="a">
<h1>JavaScript Array Explorer</h1>
<p class="subtitle"><em>Find the array method you need without digging through the docs</em></p>
<h1>{{$t('title', 'JavaScript Array Explorer')}}</h1>
<p class="subtitle"><em>{{$t('subtitle', 'Find the array method you need without digging through the docs')}}</em></p>
<app-method-primary />
</section>
<section class="b">
<h3 class="usage">Usage</h3>
<h3 class="usage">{{$t('usage', 'Usage')}}</h3>
<app-code />
</section>
</main>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>
</div>
<div v-if="selectedUsage" class="usage2">
<h3 style="margin-top: 50px">Output</h3>
<h3 style="margin-top: 50px">{{$t('output', 'Output')}}</h3>
<div class="usage-code">
<p>
<span
Expand Down
4 changes: 2 additions & 2 deletions src/components/LocaleSwitcher.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="localization-dropdown">
<a href="https://objectexplorer.netlify.com/">
<em>Object Explorer</em>
<em>{{$t('linkToObjectExplorer', 'Object Explorer')}}</em>
</a>
<br />Language:
<br />{{$t('chooseLanguage', 'Language')}}:
<select v-model="selectedLanguage">
<option v-for="(val, key) in languages" :key="key" :value="key">{{val.long}}</option>
</select>
Expand Down
2 changes: 1 addition & 1 deletion src/components/methods/MethodBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<h2><slot name="title" /></h2>
<p class="desc"><slot name="desc" /></p>
<p class="link"><em><a :href="`https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/${urlPath}`" target="_blank">see the docs &#8594;</a></em></p>
<p class="link"><em><a :href="`https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/${urlPath}`" target="_blank">{{$t('docsLink', 'see the docs')}} &#8594;</a></em></p>
</div>
</template>

Expand Down
9 changes: 8 additions & 1 deletion src/locale/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export default {
'return a string',
'order an array',
'something else'
]
],
docsLink: 'See the docs',
usage: 'Usage',
output: 'Output',
title: 'JavaScript Array Explorer',
subtitle: 'Find the array method you need without digging through the docs',
chooseLanguage: 'Language',
linkToObjectExplorer: 'Link to Object Explorer',
// other text can be added here
}
15 changes: 11 additions & 4 deletions src/locale/fi/index.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
export default {
firstMethod: 'Minulla on taulukko, haluan',
findMethod: 'Yritän löytää',
methodOptions: 'haluan',
methodOptions: 'Haluan',
methodTypes: {
add: 'lisätä',
remove: 'poistaa',
find: 'selvittää',
'iterate by': 'iteroida',
'iterate by': '',
string: 'string',
},
singleItem: 'yhden alkion/arvon',
manyItems: 'yhden tai useamman alkion/arvon',
primaryOptions: [
'lisätä alkioita tai muita taulukoita',
'lisätä alkioita tai toisia taulukoita',
'poistaa alkioita',
'löytää alkioita',
'iteroida alkioita',
'käydä alkioita läpi',
'palauttaa merkkijonon',
'järjestää taulukon',
'tehdä jotain muuta',
],
docsLink: 'Koko dokumentaatio',
usage: 'Koodi',
output: 'Tuloste',
title: 'JavaScriptin taulukoiden pikaopas',
subtitle: 'Löydä tarvitsemasi taulukkometodi ilman turhauttavaa dokumentaation selaamista',
chooseLanguage: 'Valitse kieli',
linkToObjectExplorer: 'Linkki Olioiden pikaoppaaseen',
// other text can be added here
};
100 changes: 50 additions & 50 deletions store/fi/index.js

Large diffs are not rendered by default.