mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Load applications translations for header check, add field name to invalid user warning
This commit is contained in:
parent
051c724e37
commit
2f7af7fa25
@ -368,7 +368,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
if(count($new_owner) != count(explode(',',$record[$name])))
|
||||
{
|
||||
// Unable to parse value into account
|
||||
$warnings[] = lang('%1 is not a known user or group', $record[$name]);
|
||||
$warnings[] = $name . ': ' .lang('%1 is not a known user or group', $record[$name]);
|
||||
}
|
||||
if($new_owner != '') {
|
||||
$record[$name] = $new_owner;
|
||||
|
@ -43,6 +43,11 @@
|
||||
$appname = $_GET['appname'] ? $_GET['appname'] : $content['appname'];
|
||||
$definition = $_GET['definition'] ? $_GET['definition'] : $content['definition'];
|
||||
|
||||
// Load application's translations
|
||||
if($appname)
|
||||
{
|
||||
translation::add_app($appname);
|
||||
}
|
||||
if($content['import'] && $definition) {
|
||||
try {
|
||||
$definition_obj = new importexport_definition($content['definition']);
|
||||
@ -356,7 +361,8 @@
|
||||
// Skipped column in definition
|
||||
continue;
|
||||
}
|
||||
elseif($index < count($options['csv_fields']) && strtoupper($options['csv_fields'][$index]) != strtoupper($header) && strtoupper(lang($options['csv_fields'][$index])) != strtoupper($header))
|
||||
// Check column headers, taking into account different translations
|
||||
elseif($index < count($options['csv_fields']) && strtoupper($options['csv_fields'][$index]) != strtoupper($header) && strtoupper(lang($options['csv_fields'][$index])) != strtoupper($header) && strtoupper($options['csv_fields'][$index]) != strtoupper(lang($header)))
|
||||
{
|
||||
// Problem
|
||||
$message[] = lang("Column mismatch: %1 should be %2, not %3",
|
||||
|
Loading…
Reference in New Issue
Block a user