Skip to content

Commit

Permalink
Translate no results
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebelung-Dev committed Mar 29, 2023
1 parent 5eecbfb commit b795b00
Show file tree
Hide file tree
Showing 18 changed files with 41 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
- [x] Update apps
- [x] Blocklist
- [x] New messages on start
- [x] Fix no results
- [x] Translate no results
- [x] Upgrade dependencies

### Roadmap
The roadmap has moved [here](https://github.com/orgs/Metallic-Web/projects/1/views/1).
3 changes: 3 additions & 0 deletions src/locales/de/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"noResults": "Keine Ergebnisse gefunden."
}
2 changes: 1 addition & 1 deletion src/locales/de/games.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"comingSoon": "Spiele - Demnächst!"
"noResults": "Keine Ergebnisse gefunden."
}
2 changes: 2 additions & 0 deletions src/locales/de/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import home from "./home.json"
import apps from "./apps.json"
import games from "./games.json"
import settings from "./settings.json"
import error from "./error.json"
Expand All @@ -9,6 +10,7 @@ import title from "./title.json"

var de = {
"home": home,
"apps": apps,
"games": games,
"settings": settings,
"error": error,
Expand Down
3 changes: 3 additions & 0 deletions src/locales/en/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"noResults": "No results found."
}
2 changes: 1 addition & 1 deletion src/locales/en/games.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"comingSoon": "Games - Coming Soon!"
"noResults": "No results found."
}
2 changes: 2 additions & 0 deletions src/locales/en/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import home from "./home.json"
import apps from "./apps.json"
import games from "./games.json"
import settings from "./settings.json"
import error from "./error.json"
Expand All @@ -9,6 +10,7 @@ import title from "./title.json"

var en = {
"home": home,
"apps": apps,
"games": games,
"settings": settings,
"error": error,
Expand Down
3 changes: 3 additions & 0 deletions src/locales/es/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"noResults": "No se han encontrado resultados."
}
2 changes: 1 addition & 1 deletion src/locales/es/games.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"comingSoon": "Juegos - ¡Próximamente!"
"noResults": "No se han encontrado resultados."
}
2 changes: 2 additions & 0 deletions src/locales/es/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import home from "./home.json"
import apps from "./apps.json"
import games from "./games.json"
import settings from "./settings.json"
import error from "./error.json"
Expand All @@ -9,6 +10,7 @@ import title from "./title.json"

var es = {
"home": home,
"apps": apps,
"games": games,
"settings": settings,
"error": error,
Expand Down
3 changes: 3 additions & 0 deletions src/locales/fr/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"noResults": "Aucun résultat trouvé."
}
2 changes: 1 addition & 1 deletion src/locales/fr/games.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"comingSoon": "Jeux - Bientôt disponible!"
"noResults": "Aucun résultat trouvé."
}
2 changes: 2 additions & 0 deletions src/locales/fr/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import home from "./home.json"
import apps from "./apps.json"
import games from "./games.json"
import settings from "./settings.json"
import error from "./error.json"
Expand All @@ -9,6 +10,7 @@ import title from "./title.json"

var fr = {
"home": home,
"apps": apps,
"games": games,
"settings": settings,
"error": error,
Expand Down
3 changes: 3 additions & 0 deletions src/locales/zh/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"noResults": "未找到结果。"
}
2 changes: 1 addition & 1 deletion src/locales/zh/games.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"comingSoon": "游戏 - 即将推出!"
"noResults": "未找到结果。"
}
2 changes: 2 additions & 0 deletions src/locales/zh/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import home from "./home.json"
import apps from "./apps.json"
import games from "./games.json"
import settings from "./settings.json"
import error from "./error.json"
Expand All @@ -9,6 +10,7 @@ import title from "./title.json"

var zh = {
"home": home,
"apps": apps,
"games": games,
"settings": settings,
"error": error,
Expand Down
5 changes: 4 additions & 1 deletion src/pages/apps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import Proxy from "../components/proxy.jsx";
import globeSVG from "../assets/globe.svg";
import gitems from "../assets/apps.json";
import { getLink } from "../util.jsx";
import { useTranslation } from 'react-i18next';

function Apps() {
const { t } = useTranslation("apps");

var proxy = React.useRef();

function goApp(config) {
Expand Down Expand Up @@ -64,7 +67,7 @@ function Apps() {
</div>
</div>
{!gitemssearched.length ? (
<div className="desc">No results found.</div>
<div className="desc">{t("noResults")}</div>
) : (
""
)}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/games.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import Obfuscate from "../components/obfuscate.jsx";
import Proxy from "../components/proxy.jsx";
import globeSVG from "../assets/globe.svg";
import gitems from "../assets/games.json";
import { useTranslation } from 'react-i18next';

function Games() {
const { t } = useTranslation("games");

var proxy = React.useRef();

function goGame(config) {
Expand Down Expand Up @@ -62,7 +65,7 @@ function Games() {
</div>
</div>
{!gitemssearched.length ? (
<div className="desc">No results found.</div>
<div className="desc">{t("noResults")}</div>
) : (
""
)}
Expand Down

0 comments on commit b795b00

Please sign in to comment.