Skip to content

Commit

Permalink
Merge pull request #24 from jtojnar/l10n
Browse files Browse the repository at this point in the history
Add localization
  • Loading branch information
gpascualg authored Apr 25, 2017
2 parents db880c5 + 624ca3a commit 63847ba
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 13 deletions.
12 changes: 5 additions & 7 deletions js/forum/dist/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions js/forum/src/components/ChatFrame.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions locale/cs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pushedx-chat:
forum:
toolbar:
title: Chat
enable_sounds: Zapnout zvuky
disable_sounds: Vypnout zvuky
enable_notifications: Zapnout oznámení
disable_notifications: Vypnout oznámení
errors:
unauthenticated: Do chatu mohou přispívat pouze registrovaní uživatelé
10 changes: 10 additions & 0 deletions locale/en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pushedx-chat:
forum:
toolbar:
title: Chat
enable_sounds: Enable sounds
disable_sounds: Disable sounds
enable_notifications: Enable notifications
disable_notifications: Disable notifications
errors:
unauthenticated: Only registered users can use the chat
10 changes: 10 additions & 0 deletions locale/es.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pushedx-chat:
forum:
toolbar:
title: PushEdx Chat
enable_sounds: Habilitar sonidos
disable_sounds: Deshabilitar sonidos
enable_notifications: Habilitar notificaciones
disable_notifications: Deshabilitar notificaciones
errors:
unauthenticated: Solo los usuarios registrados pueden usar el chat
4 changes: 2 additions & 2 deletions src/Listeners/AddClientAssets.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function subscribe(Dispatcher $events)
{
$events->listen(ConfigureWebApp::class, [$this, 'addForumAssets']);
$events->listen(ConfigureWebApp::class, [$this, 'addAdminAssets']);
//$events->listen(ConfigureLocales::class, [$this, 'addLocales']);
$events->listen(ConfigureLocales::class, [$this, 'addLocales']);
}

/**
Expand Down Expand Up @@ -72,7 +72,7 @@ public function addAdminAssets(ConfigureWebApp $event)
public function addLocales(ConfigureLocales $event)
{
foreach (new DirectoryIterator(__DIR__.'/../../locale') as $file) {
if ($file->isFile() && in_array($file->getExtension(), ['yml', 'yaml'])) {
if ($file->isFile() && $file->getExtension() === 'yaml') {
$event->locales->addTranslations($file->getBasename('.'.$file->getExtension()), $file->getPathname());
}
}
Expand Down

0 comments on commit 63847ba

Please sign in to comment.