Skip to content

Commit

Permalink
fix: several missing cap in strings
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Nov 27, 2020
1 parent b4b5340 commit b8a37b6
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion inc/abstractfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public final function deleteParameters(PluginFormcreatorQuestion $question) {
foreach ($this->getEmptyParameters() as $parameter) {
if (!$parameter->deleteByCriteria(['plugin_formcreator_questions_id' => $question->getID()])) {
// Don't make this error fatal, but log it anyway
Toolbox::logInFile('php-errors', 'failed to delete parameter for question ' . $question->getID() . PHP_EOL);
Toolbox::logInFile('php-errors', 'Failed to delete parameter for question ' . $question->getID() . PHP_EOL);
}
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion inc/condition.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the question to the linker
Expand Down
6 changes: 3 additions & 3 deletions inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1919,15 +1919,15 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
false,
WARNING
);
throw new ImportFailureException('failed to add or update the item');
throw new ImportFailureException('Failed to add or update the item');
} else {
// The form is in an entity which does not exists yet
Session::addMessageAfterRedirect(
sprintf(__('The entity %1$s is required for the form %2$s.', 'formcreator'), $input['_entity'], $input['name']),
false,
WARNING
);
throw new ImportFailureException('failed to add or update the item');
throw new ImportFailureException('Failed to add or update the item');
}
}
}
Expand Down Expand Up @@ -1960,7 +1960,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the form to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/form_profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the form_profile to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/form_validator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $for
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the item to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/item_targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the target to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/question.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the question to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/questiondependency.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the parameter to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/questionrange.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the question to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/questionregex.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the question to the linker
Expand Down
2 changes: 1 addition & 1 deletion inc/section.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the section to the linker
Expand Down
8 changes: 4 additions & 4 deletions inc/target_actor.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
$user = new User;
$users_id = plugin_formcreator_getFromDBByField($user, 'name', $input['actor_value']);
if ($users_id === false) {
throw new ImportFailureException(sprintf(__('failed to find a user: ID %1$d'), $users_id));
throw new ImportFailureException(sprintf(__('Failed to find a user: ID %1$d'), $users_id));
}
$input['actor_value'] = $users_id;
break;
Expand All @@ -146,7 +146,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
$group = new Group;
$groups_id = plugin_formcreator_getFromDBByField($group, 'completename', $input['actor_value']);
if ($groups_id === false) {
throw new ImportFailureException(sprintf(__('failed to find a group: ID %1$d'), $groups_id));
throw new ImportFailureException(sprintf(__('Failed to find a group: ID %1$d'), $groups_id));
}
$input['actor_value'] = $groups_id;
break;
Expand All @@ -155,7 +155,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
$supplier = new Supplier;
$suppliers_id = plugin_formcreator_getFromDBByField($supplier, 'name', $input['actor_value']);
if ($suppliers_id === false) {
throw new ImportFailureException(sprintf(__('failed to find a supplier: ID %1$d'), $suppliers_id));
throw new ImportFailureException(sprintf(__('Failed to find a supplier: ID %1$d'), $suppliers_id));
}
$input['actor_value'] = $suppliers_id;
break;
Expand All @@ -172,7 +172,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the question to the linker
Expand Down
4 changes: 2 additions & 2 deletions inc/targetchange.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
$question = $linker->getObject($input[$fieldSetting['field']], PluginFormcreatorQuestion::class);
if ($question === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s: a question is missing and is used in a parameter of the target', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s: a question is missing and is used in a parameter of the target', 'formceator'), $typeName, $input['name']));
}
$input[$fieldSetting['field']] = $question->getID();
}
Expand All @@ -244,7 +244,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the target to the linker
Expand Down
4 changes: 2 additions & 2 deletions inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
$question = $linker->getObject($input[$fieldSetting['field']], PluginFormcreatorQuestion::class);
if ($question === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s: a question is missing and is used in a parameter of the target', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s: a question is missing and is used in a parameter of the target', 'formceator'), $typeName, $input['name']));
}
$input[$fieldSetting['field']] = $question->getID();
}
Expand All @@ -1171,7 +1171,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
}
if ($itemId === false) {
$typeName = strtolower(self::getTypeName());
throw new ImportFailureException(sprintf(__('failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
throw new ImportFailureException(sprintf(__('Failed to add or update the %1$s %2$s', 'formceator'), $typeName, $input['name']));
}

// add the target to the linker
Expand Down

0 comments on commit b8a37b6

Please sign in to comment.