mirror of
https://github.com/dani/vroom.git
synced 2024-06-10 17:01:41 +02:00
Don't maintain a list of string to translate
Instead, just translate everything
This commit is contained in:
parent
2dde2050a9
commit
cf7af105f9
|
@ -96,59 +96,6 @@ use constant MOH => {
|
|||
}
|
||||
};
|
||||
|
||||
# List of strings needed on client side
|
||||
use constant JS_STRINGS => qw(
|
||||
ERROR_MAIL_INVALID
|
||||
ERROR_OCCURRED
|
||||
ERROR_NAME_INVALID
|
||||
CANT_SHARE_SCREEN
|
||||
SCREEN_SHARING_ONLY_FOR_CHROME
|
||||
SCREEN_SHARING_CANCELLED
|
||||
EVERYONE_CAN_SEE_YOUR_SCREEN
|
||||
SCREEN_UNSHARED
|
||||
MIC_MUTED
|
||||
MIC_UNMUTED
|
||||
CAM_SUSPENDED
|
||||
CAM_RESUMED
|
||||
SET_YOUR_NAME_TO_CHAT
|
||||
SCREEN_s
|
||||
NO_SOUND_DETECTED
|
||||
DISPLAY_NAME_TOO_LONG
|
||||
s_IS_MUTING_YOU
|
||||
s_IS_MUTING_s
|
||||
s_IS_UNMUTING_YOU
|
||||
s_IS_UNMUTING_s
|
||||
s_IS_SUSPENDING_YOU
|
||||
s_IS_SUSPENDING_s
|
||||
s_IS_RESUMING_YOU
|
||||
s_IS_RESUMING_s
|
||||
s_IS_PROMOTING_YOU
|
||||
s_IS_PROMOTING_s
|
||||
s_IS_KICKING_s
|
||||
s_CHANGED_ROOM_CONFIG
|
||||
MUTE_PEER
|
||||
SUSPEND_PEER
|
||||
PROMOTE_PEER
|
||||
KICK_PEER
|
||||
YOU_HAVE_MUTED_s
|
||||
YOU_HAVE_UNMUTED_s
|
||||
CANT_MUTE_OWNER
|
||||
YOU_HAVE_SUSPENDED_s
|
||||
YOU_HAVE_RESUMED_s
|
||||
CANT_SUSPEND_OWNER
|
||||
CANT_PROMOTE_OWNER
|
||||
YOU_HAVE_KICKED_s
|
||||
CANT_KICK_OWNER
|
||||
REMOVE_THIS_ADDRESS
|
||||
DISPLAY_NAME_REQUIRED
|
||||
A_ROOM_ADMIN
|
||||
A_PARTICIPANT
|
||||
PASSWORDS_DO_NOT_MATCH
|
||||
WAIT_WITH_MUSIC
|
||||
DATA_WIPED
|
||||
ROOM_DATA_WIPED_BY_s
|
||||
);
|
||||
|
||||
# API actions
|
||||
use constant API_ACTIONS => {
|
||||
admin => {
|
||||
|
|
4
vroom.pl
4
vroom.pl
|
@ -1126,12 +1126,10 @@ any [qw(GET POST)] => '/invitation/:token' => { token => '' } => sub {
|
|||
};
|
||||
|
||||
# Translation for JS resources
|
||||
# As there's no way to list all the available translated strings
|
||||
# we just maintain a list of strings needed
|
||||
get '/localize/:lang' => { lang => 'en' } => sub {
|
||||
my $self = shift;
|
||||
my $strings = {};
|
||||
foreach my $string (JS_STRINGS){
|
||||
foreach my $string (keys %Vroom::I18N::en::Lexicon){
|
||||
$strings->{$string} = $self->l($string);
|
||||
}
|
||||
# Tell the client to cache it
|
||||
|
|
Loading…
Reference in New Issue
Block a user