Skip to content

Commit

Permalink
Merge branch 'master' into PHRAS-2069-integrate-plugin-updatemetadata…
Browse files Browse the repository at this point in the history
…-to-core
  • Loading branch information
nmaillat authored Nov 23, 2023
2 parents 8a0d143 + 4bdc4e6 commit ccd5837
Show file tree
Hide file tree
Showing 12 changed files with 261 additions and 241 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function process(array $payload)
'eventsmanager_notify_basketwip',
// 'eventsmanager_notify_push',
json_encode([
'translateMessage' => 'notification:: Sharing basket "%name%"...',
'translateMessage' => 'text1',
'name' => htmlentities($basket->getName())
]),
false
Expand Down Expand Up @@ -396,7 +396,7 @@ public function process(array $payload)
'eventsmanager_notify_basketwip',
// 'eventsmanager_notify_push',
json_encode([
'translateMessage' => 'notification:: Basket %name% is shared',
'translateMessage' => 'text2',
'name' => htmlentities($basket->getName())
]),
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ public function process(array $payload)
$payload['authenticatedUserId'],
'eventsmanager_notify_subtitle',
json_encode([
'translateMessage' => 'notification:: subtitle "%langues%" generated for "%title%" !',
'langues' => implode(', ', array_keys($payload['languageDestination'])),
'title' => htmlentities($record->get_title())
]),
Expand Down
6 changes: 5 additions & 1 deletion lib/classes/eventsmanager/notify/basketwip.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ public function datas(array $data, $unread)
// to be retro compatible with old data value
$text = $data['message'];
} else {
$text = $this->app->trans($data['translateMessage'], ['%name%' => $data['name']]);
if ($data['translateMessage'] == 'text1') {
$text = $this->app->trans('notification:: Sharing basket "%name%"...', ['%name%' => $data['name']]);
} else {
$text = $this->app->trans('notification:: Basket %name% is shared', ['%name%' => $data['name']]);
}
}

$ret = [
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/eventsmanager/notify/subtitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function icon_url()
*/
public function datas(array $data, $unread)
{
$text = $this->app->trans($data['translateMessage'], ['%title%' => $data['title'], '%langues%' => $data['langues']]);
$text = $this->app->trans('notification:: subtitle "%langues%" generated for "%title%" !', ['%title%' => $data['title'], '%langues%' => $data['langues']]);

return [
'text' => $text,
Expand Down
152 changes: 78 additions & 74 deletions resources/locales/messages.de.xlf

Large diffs are not rendered by default.

134 changes: 69 additions & 65 deletions resources/locales/messages.en.xlf

Large diffs are not rendered by default.

120 changes: 62 additions & 58 deletions resources/locales/messages.fr.xlf

Large diffs are not rendered by default.

75 changes: 40 additions & 35 deletions resources/locales/messages.nl.xlf

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/locales/validators.de.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2023-11-20T14:57:43Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<file date="2023-11-23T15:53:32Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
Expand Down
2 changes: 1 addition & 1 deletion resources/locales/validators.en.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2023-11-20T14:57:58Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<file date="2023-11-23T15:53:48Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
Expand Down
2 changes: 1 addition & 1 deletion resources/locales/validators.fr.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2023-11-20T14:58:17Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<file date="2023-11-23T15:54:08Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
Expand Down
2 changes: 1 addition & 1 deletion resources/locales/validators.nl.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2023-11-20T14:58:39Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<file date="2023-11-23T15:54:30Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
Expand Down

0 comments on commit ccd5837

Please sign in to comment.