|
Lines 64-92
Link Here
|
| 64 |
var message; |
64 |
var message; |
| 65 |
if ( type == 'success_on_update' ) { |
65 |
if ( type == 'success_on_update' ) { |
| 66 |
message = $('<div class="dialog message"></div>'); |
66 |
message = $('<div class="dialog message"></div>'); |
| 67 |
message.text("Entity %s (code %s) for lang %s has correctly been updated with '%s'".format(data.entity, data.code, data.lang, data.translation)); |
67 |
message.text(_("Entity %s (code %s) for lang %s has correctly been updated with '%s'").format(data.entity, data.code, data.lang, data.translation)); |
| 68 |
} else if ( type == 'error_on_update' ) { |
68 |
} else if ( type == 'error_on_update' ) { |
| 69 |
message = $('<div class="dialog alert"></div>'); |
69 |
message = $('<div class="dialog alert"></div>'); |
| 70 |
if ( data.error_code == 'already_exists' ) { |
70 |
if ( data.error_code == 'already_exists' ) { |
| 71 |
message.text("A translation already exists for this language."); |
71 |
message.text(_("A translation already exists for this language.")); |
| 72 |
} else { |
72 |
} else { |
| 73 |
message.text("An error occurred when updating this translation."); |
73 |
message.text(_("An error occurred when updating this translation.")); |
| 74 |
} |
74 |
} |
| 75 |
} else if ( type == 'success_on_delete' ) { |
75 |
} else if ( type == 'success_on_delete' ) { |
| 76 |
message = $('<div class="dialog message"></div>'); |
76 |
message = $('<div class="dialog message"></div>'); |
| 77 |
message.text("The translation (id %s) has been removed successfully".format(data.id)); |
77 |
message.text(_("The translation (id %s) has been removed successfully").format(data.id)); |
| 78 |
} else if ( type == 'error_on_delete' ) { |
78 |
} else if ( type == 'error_on_delete' ) { |
| 79 |
message = $('<div class="dialog alert"></div>'); |
79 |
message = $('<div class="dialog alert"></div>'); |
| 80 |
message.text("An error occurred when deleting this translation"); |
80 |
message.text(_("An error occurred when deleting this translation")); |
| 81 |
} else if ( type == 'success_on_insert' ) { |
81 |
} else if ( type == 'success_on_insert' ) { |
| 82 |
message = $('<div class="dialog message"></div>'); |
82 |
message = $('<div class="dialog message"></div>'); |
| 83 |
message.text("Translation (id %s) has been added successfully".format(data.id)); |
83 |
message.text(_("Translation (id %s) has been added successfully").format(data.id)); |
| 84 |
} else if ( type == 'error_on_insert' ) { |
84 |
} else if ( type == 'error_on_insert' ) { |
| 85 |
message = $('<div class="dialog alert"></div>'); |
85 |
message = $('<div class="dialog alert"></div>'); |
| 86 |
if ( data.error_code == 'already_exists' ) { |
86 |
if ( data.error_code == 'already_exists' ) { |
| 87 |
message.text("A translation already exists for this language."); |
87 |
message.text(_("A translation already exists for this language.")); |
| 88 |
} else { |
88 |
} else { |
| 89 |
message.text("An error occurred when adding this translation"); |
89 |
message.text(_("An error occurred when adding this translation")); |
| 90 |
} |
90 |
} |
| 91 |
} |
91 |
} |
| 92 |
|
92 |
|
| 93 |
- |
|
|