Skip to content

Commit

Permalink
Add translation keys
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMazB committed Jun 4, 2021
1 parent 98ff737 commit 09e64d0
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/Leaderboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function onRender()
public function componentDetails()
{
return [
'name' => 'Leaderboard Component',
'description' => 'No description provided yet...'
'name' => 'Leaderboard',
'description' => 'sunlab.levelup::lang.components.leaderboard_description'
];
}

Expand All @@ -45,7 +45,6 @@ public function defineProperties()
return [
'nb-users-to-display' => [
'title' => 'sunlab.levelup::lang.components.nb_users_to_display',
'description' => 'sunlab.levelup::lang.components.nb_users_to_display_description',
'default' => '10',
'type' => 'string',
'validationPattern' => '^[0-9]+$',
Expand Down
32 changes: 32 additions & 0 deletions lang/en/lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php return [
'settings' => [
'experience_increasers' => [
'name' => 'Experience Increasers',
'description' => 'Configure how and how many users win experience',
],
'levels' => [
'name' => 'Levels',
'description' => 'Configure levels cap',
]
],
'fields' => [
'level' => 'Level',
'experience_needed' => 'Experience needed',
'measure_name' => 'Measure name',
'points' => 'Points',
],
'components' => [
'nb_users_to_display' => 'Nb users to display',
'leaderboard_description' => 'Displays the most experienced users',
'experience_gauge' => 'Experience Gauge',
'experience_gauge_description' => "Displays a user's experience gauge",
'user_id' => 'User id',
'user_id_description' => 'Should match the url parameter',
'logged_user' => 'On logged-in user',
'logged_user_description' => 'Displays the logged-in user data',
],
'errors' => [
'conflictual_level' => "Can't save level because level :level needs :experience_needed",
'level_one_cant_be_deleted' => "The level one can't be deleted"
]
];
32 changes: 32 additions & 0 deletions lang/fr/lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php return [
'settings' => [
'experience_increasers' => [
'name' => "Multiplicateur d'expérience",
'description' => "Configurez quand et de combien les utilisateurs gagne de l'expérience",
],
'levels' => [
'name' => 'Niveaux',
'description' => 'Configurez les niveaux à franchir',
]
],
'fields' => [
'level' => 'Niveau',
'experience_needed' => 'Expérience nécessaire',
'measure_name' => 'Nom de la mesure',
'points' => 'Points',
],
'components' => [
'nb_users_to_display' => "Nb d'utilisateur à afficher",
'leaderboard_description' => 'Affiche le top utilisateur',
'experience_gauge' => "Barre d'expérience",
'experience_gauge_description' => "Affiche la barre d'expérience d'un utilisateur",
'user_id' => 'ID utilisateur',
'user_id_description' => "Doit correspondre au paramètre de l'url",
'logged_user' => "Pour l'utilisateur connecté",
'logged_user_description' => "Affiche la barre d'expérience de l'utilisateur connecté",
],
'errors' => [
'conflictual_level' => "Sauvegarde impossible car le niveau :level nécessite :experience_needed points d'expérience",
'level_one_cant_be_deleted' => "Le niveau un ne peut pas être supprimé"
]
];

0 comments on commit 09e64d0

Please sign in to comment.