Skip to content

Commit

Permalink
Polish locale upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
MarksSoftwareGmbH committed Feb 23, 2024
1 parent ef94b80 commit 40df1ff
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 8 deletions.
23 changes: 23 additions & 0 deletions plugins/YabCmsFf/config/Seeds/CategoriesSeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,29 @@ public function run(): void
'deleted' => NULL,
'deleted_by' => NULL,
],
[
'id' => '4',
'parent_id' => NULL,
'domain_id' => '1',
'uuid_id' => Text::uuid(),
'foreign_key' => NULL,
'lft' => '7',
'rght' => '8',
'name' => 'Standardowy',
'slug' => 'standardowy',
'description' => 'Jest to standardowa kategoria.',
'background_image' => '',
'meta_description' => 'Jest to standardowa kategoria.',
'meta_keywords' => 'Standardowy, Kategoria',
'locale' => 'pl_PL',
'status' => '1',
'created' => $dateTime->i18nFormat('yyyy-MM-dd HH:mm:ss'),
'created_by' => '1',
'modified' => $dateTime->i18nFormat('yyyy-MM-dd HH:mm:ss'),
'modified_by' => '1',
'deleted' => NULL,
'deleted_by' => NULL,
],
];

$table = $this->table('categories');
Expand Down
6 changes: 6 additions & 0 deletions plugins/YabCmsFf/config/Seeds/DomainsLocalesSeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public function run(): void
'locale_id' => '3',
'position' => '3',
],
[
'id' => '4',
'domain_id' => '1',
'locale_id' => '4',
'position' => '4',
],
];

$table = $this->table('domains_locales');
Expand Down
16 changes: 16 additions & 0 deletions plugins/YabCmsFf/config/Seeds/LocalesSeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ public function run(): void
'deleted' => NULL,
'deleted_by' => NULL,
],
[
'id' => '4',
'uuid_id' => Text::uuid(),
'foreign_key' => NULL,
'name' => 'Polish',
'native' => 'Polski',
'code' => 'pl_PL',
'weight' => '4',
'status' => '1',
'created' => $dateTime->i18nFormat('yyyy-MM-dd HH:mm:ss'),
'created_by' => '1',
'modified' => $dateTime->i18nFormat('yyyy-MM-dd HH:mm:ss'),
'modified_by' => '1',
'deleted' => NULL,
'deleted_by' => NULL,
],
];

$table = $this->table('locales');
Expand Down
14 changes: 7 additions & 7 deletions plugins/YabCmsFf/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
// Article promoted
$routes
->connect('/{locale}/', ['controller' => 'Articles', 'action' => 'promoted'])
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he']);
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he|pl']);
$routes
->connect('/', ['controller' => 'Articles', 'action' => 'promoted']);

// Article view by slug
$routes
->connect('/{locale}/{slug}', ['controller' => 'Articles', 'action' => 'view'])
->setPass(['slug'])
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he']);
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he|pl']);
$routes
->connect('/{slug}', ['controller' => 'Articles', 'action' => 'view'])
->setPass(['slug']);
Expand All @@ -56,7 +56,7 @@
$routes
->connect('/{locale}/type/{articleType}', ['controller' => 'Articles', 'action' => 'index'])
->setPass(['articleType'])
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he']);
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he|pl']);
$routes
->connect('/type/{articleType}', ['controller' => 'Articles', 'action' => 'index'])
->setPass(['articleType']);
Expand All @@ -65,7 +65,7 @@
$routes
->connect('/{locale}/{articleType}/{slug}', ['controller' => 'Articles', 'action' => 'view'])
->setPass(['articleType', 'slug'])
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he']);
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he|pl']);
$routes
->connect('/{articleType}/{slug}', ['controller' => 'Articles', 'action' => 'view'])
->setPass(['articleType', 'slug']);
Expand All @@ -74,15 +74,15 @@
$routes
->connect('/{locale}/page/{slug}', ['controller' => 'Articles', 'action' => 'pageView'])
->setPass(['slug'])
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he']);
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he|pl']);
$routes
->connect('/page/{slug}', ['controller' => 'Articles', 'action' => 'pageView'])
->setPass(['slug']);

// Article search
$routes
->connect('/{locale}/search', ['controller' => 'Articles', 'action' => 'search'])
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he']);
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he|pl']);
$routes
->connect('/search', ['controller' => 'Articles', 'action' => 'search']);

Expand Down Expand Up @@ -111,7 +111,7 @@
// Sitemap
$routes
->connect('/{locale}/sitemap', ['controller' => 'Articles', 'action' => 'sitemap'])
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he']);
->setPatterns(['locale' => 'de|en|nl|fr|it|es|pt|ru|zh|ar|he|pl']);
$routes
->connect('/sitemap', ['controller' => 'Articles', 'action' => 'sitemap']);

Expand Down
3 changes: 2 additions & 1 deletion plugins/YabCmsFf/templates/element/Users/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -2305,6 +2305,7 @@ function rand(min, max) {
'class' => 'col-sm-2 col-form-label',
'text' => __d('yab_cms_ff', 'Prefix'),
'escapeTitle' => false,
],
'templates' => [
'inputContainer' => '<div class="form-group row {{type}}{{required}}">{{content}}{{help}}</div>',
'inputContainerError' => '<div class="form-group row {{type}}{{required}} invalid-feedback">{{content}}{{error}}{{help}}</div>',
Expand Down Expand Up @@ -3304,7 +3305,7 @@ function rand(min, max) {
'type' => 'email',
'value' => htmlspecialchars_decode($userAccount->email),
'label' => [
'class' => 'col-sm-2 col-form-label',
'class' => 'col-sm-2 col-form-label',
'text' => $this->Html->tag('p', __d('yab_cms_ff', 'Email') . '*', ['class' => 'text-danger']),
'escapeTitle' => false,
],
Expand Down

0 comments on commit 40df1ff

Please sign in to comment.