refactor system configuration title and wording (#2847)

This commit is contained in:
Kevin Papst
2021-10-13 13:37:44 +02:00
committed by GitHub
parent 6d7d441d42
commit 843cd8fb67
34 changed files with 48 additions and 252 deletions

View File

@@ -449,11 +449,12 @@ final class SystemConfigurationController extends AbstractController
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_FORM_INVOICE)
->setConfiguration([
// TODO that should be a custom type with validation
(new Configuration())
->setName('invoice.number_format')
->setLabel('invoice.number_format')
->setRequired(true)
->setType(TextType::class) // TODO that should be a custom type with validation
->setType(TextType::class)
->setTranslationDomain('system-configuration'),
(new Configuration())
->setName('invoice.simple_form')
@@ -470,15 +471,18 @@ final class SystemConfigurationController extends AbstractController
->setName('defaults.customer.timezone')
->setLabel('timezone')
->setType(TimezoneType::class)
->setValue(date_default_timezone_get()),
->setValue(date_default_timezone_get())
->setOptions(['help' => 'default_value_new']),
(new Configuration())
->setName('defaults.customer.country')
->setLabel('country')
->setType(CountryType::class),
->setType(CountryType::class)
->setOptions(['help' => 'default_value_new']),
(new Configuration())
->setName('defaults.customer.currency')
->setLabel('currency')
->setType(CurrencyType::class),
->setType(CurrencyType::class)
->setOptions(['help' => 'default_value_new']),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_FORM_USER)
@@ -487,19 +491,28 @@ final class SystemConfigurationController extends AbstractController
->setName('defaults.user.timezone')
->setLabel('timezone')
->setType(TimezoneType::class)
->setValue(date_default_timezone_get()),
->setValue(date_default_timezone_get())
->setOptions(['help' => 'default_value_new']),
(new Configuration())
->setName('defaults.user.language')
->setLabel('language')
->setType(LanguageType::class),
->setType(LanguageType::class)
->setOptions(['help' => 'default_value_new']),
(new Configuration())
->setName('defaults.user.theme')
->setLabel('skin')
->setType(SkinType::class),
->setType(SkinType::class)
->setOptions(['help' => 'default_value_new']),
(new Configuration())
->setName('defaults.user.currency')
->setLabel('currency')
->setType(CurrencyType::class),
(new Configuration())
->setName('theme.avatar_url')
->setRequired(false)
->setLabel('theme.avatar_url')
->setType(CheckboxType::class)
->setTranslationDomain('system-configuration'),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_THEME)
@@ -532,13 +545,6 @@ final class SystemConfigurationController extends AbstractController
->setOptions(['help' => 'help.theme.color_choices'])
->setConstraints([new ColorChoices()])
->setTranslationDomain('system-configuration'),
// allow avatar URLs
(new Configuration())
->setName('theme.avatar_url')
->setRequired(false)
->setLabel('theme.avatar_url')
->setType(CheckboxType::class)
->setTranslationDomain('system-configuration'),
// random colors as fallback
(new Configuration())
->setName('theme.random_colors')

View File

@@ -15,8 +15,8 @@ class SystemConfiguration
public const SECTION_LOCKDOWN = 'lockdown_period';
public const SECTION_TIMESHEET = 'timesheet';
public const SECTION_FORM_INVOICE = 'invoice';
public const SECTION_FORM_CUSTOMER = 'form_customer';
public const SECTION_FORM_USER = 'form_user';
public const SECTION_FORM_CUSTOMER = 'customer';
public const SECTION_FORM_USER = 'user';
public const SECTION_THEME = 'theme';
public const SECTION_AUTHENTICATION = 'authentication';
public const SECTION_CALENDAR = 'calendar';

View File

@@ -9,8 +9,12 @@
{% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
{% for section in sections %}
{% set title = section.model.section|trans({}, 'system-configuration') %}
{% if title == section.model.section %}
{% set title = ('label.' ~ section.model.section)|trans %}
{% endif %}
{{ include(formEditTemplate, {
'title': section.model.section|trans({}, 'system-configuration'),
'title': title,
'form': section.form,
}) }}
{% endfor %}

View File

@@ -54,8 +54,6 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/admin/system-config/edit/timesheet');
$expectedForms = $this->getTestDataForms();
$result = $client->getCrawler()->filter('section.content div.box.box-primary');
$this->assertEquals(1, \count($result));
@@ -76,8 +74,8 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
['form[name=system_configuration_form_invoice]', $this->createUrl('/admin/system-config/update/invoice')],
['form[name=system_configuration_form_authentication]', $this->createUrl('/admin/system-config/update/authentication')],
['form[name=system_configuration_form_rounding]', $this->createUrl('/admin/system-config/update/rounding')],
['form[name=system_configuration_form_form_customer]', $this->createUrl('/admin/system-config/update/form_customer')],
['form[name=system_configuration_form_form_user]', $this->createUrl('/admin/system-config/update/form_user')],
['form[name=system_configuration_form_customer]', $this->createUrl('/admin/system-config/update/customer')],
['form[name=system_configuration_form_user]', $this->createUrl('/admin/system-config/update/user')],
['form[name=system_configuration_form_theme]', $this->createUrl('/admin/system-config/update/theme')],
['form[name=system_configuration_form_calendar]', $this->createUrl('/admin/system-config/update/calendar')],
['form[name=system_configuration_form_branding]', $this->createUrl('/admin/system-config/update/branding')],
@@ -191,9 +189,9 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$this->assertEquals('DE', $configService->find('defaults.customer.country'));
$this->assertEquals('EUR', $configService->find('defaults.customer.currency'));
$form = $client->getCrawler()->filter('form[name=system_configuration_form_form_customer]')->form();
$form = $client->getCrawler()->filter('form[name=system_configuration_form_customer]')->form();
$client->submit($form, [
'system_configuration_form_form_customer' => [
'system_configuration_form_customer' => [
'configuration' => [
['name' => 'defaults.customer.timezone', 'value' => 'Atlantic/Canary'],
['name' => 'defaults.customer.country', 'value' => 'BB'],
@@ -223,9 +221,9 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$this->assertNull($configService->find('defaults.user.theme'));
$this->assertEquals('en', $configService->find('defaults.user.language'));
$form = $client->getCrawler()->filter('form[name=system_configuration_form_form_user]')->form();
$form = $client->getCrawler()->filter('form[name=system_configuration_form_user]')->form();
$client->submit($form, [
'system_configuration_form_form_user' => [
'system_configuration_form_user' => [
'configuration' => [
['name' => 'defaults.user.timezone', 'value' => 'Pacific/Tahiti'],
['name' => 'defaults.user.language', 'value' => 'ru'],
@@ -250,9 +248,9 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$this->assertFormHasValidationError(
User::ROLE_SUPER_ADMIN,
'/admin/system-config/',
'form[name=system_configuration_form_form_customer]',
'form[name=system_configuration_form_customer]',
[
'system_configuration_form_form_customer' => [
'system_configuration_form_customer' => [
'configuration' => [
['name' => 'defaults.customer.timezone', 'value' => 'XX'],
['name' => 'defaults.customer.country', 'value' => 1],
@@ -261,9 +259,9 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
]
],
[
'#system_configuration_form_form_customer_configuration_0_value',
'#system_configuration_form_form_customer_configuration_1_value',
'#system_configuration_form_form_customer_configuration_2_value',
'#system_configuration_form_customer_configuration_0_value',
'#system_configuration_form_customer_configuration_1_value',
'#system_configuration_form_customer_configuration_2_value',
],
true
);

View File

@@ -725,7 +725,7 @@
</trans-unit>
<trans-unit id="label.avatar">
<source>label.avatar</source>
<target>Profilbild</target>
<target>Profilbild (URL)</target>
</trans-unit>
<trans-unit id="label.active">
<source>label.active</source>
@@ -1252,6 +1252,10 @@
<source>team.add_user.help</source>
<target>Durch Auswahl wird dem Team ein neuer Benutzer hinzugefügt. Sie können im Anschluss festlegen, ob der Benutzer ein Teamleiter sein soll.</target>
</trans-unit>
<trans-unit id="default_value_new">
<source>default_value_new</source>
<target>Standard Wert für neue Einträge</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -725,7 +725,7 @@
</trans-unit>
<trans-unit id="label.avatar">
<source>label.avatar</source>
<target>Profile image</target>
<target>Profile image (URL)</target>
</trans-unit>
<trans-unit id="label.active">
<source>label.active</source>
@@ -1252,6 +1252,10 @@
<source>team.add_user.help</source>
<target>Add a new user to the team by selecting it from the list. Afterwards you can decide if the user should become a teamlead.</target>
</trans-unit>
<trans-unit id="default_value_new">
<source>default_value_new</source>
<target>Default values for new entries</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>الفواتير</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>إنشاء العميل — القيم الافتراضية</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>المستخدم — القيم الافتراضية</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>موضوع</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Pracovní výkaz</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Vytvořit zákazníka—výchozí hodnota</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Uživatel—výchozí hodnota</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Vzhled</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Timeseddel</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Opret standardværdier for kunder</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Standardværdier for brugere</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Tema</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>Rechnungen</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Kunden anlegen - Standard Werte</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Benutzer - Standard Werte</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Darstellung</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>Τιμολόγια</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Δημιουργία πελάτη - προεπιλεγμένες τιμές</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Χρήστης - προεπιλεγμένες τιμές</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Θέμα</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>Invoices</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Create customer—default values</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>User—default values</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Theme</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>Fakturoj</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Krei defaŭltajn valorojn de kliento</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Defaŭltaj valoroj de uzanto</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Etoso</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Parte de horas</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Crear cliente. Valores predeterminados</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Valores predeterminados. Usuario</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Tema</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Ordu taula</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Bezeroa sortu - defektuzko balioekin</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Defektuzko balioak - erabiltzailea</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Itxura</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target state="translated">Laskut</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target state="translated">Luo asiakas—oletus arvot</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target state="translated">Käyttäjä—oletus arvot</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target state="translated">Teema</target>

View File

@@ -10,10 +10,6 @@
<source>timesheet</source>
<target>Fiche de temps</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Créer un client : Valeurs par défaut</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Thème</target>
@@ -210,10 +206,6 @@
<source>label.theme.tags_create</source>
<target>Mots-clés : Utiliser la recherche avec auto-complétion et autoriser la création de mots-clés</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Utilisateur : Valeurs par défaut</target>
</trans-unit>
<trans-unit id="invoice">
<source>invoice</source>
<target>Factures</target>

View File

@@ -17,14 +17,6 @@
<source>invoice</source>
<target>חשבוניות</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>צור ערכי ברירת מחדל ללקוח</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>ערכי ברירת מחדל למשתמש</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>ערכת עיצוב</target>

View File

@@ -18,14 +18,6 @@
<source>invoice</source>
<target>Računi</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Stvori standardne vrijednosti za kupca</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Standardne vrijednosti za korisnika</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Tema</target>

View File

@@ -10,10 +10,6 @@
<source>timesheet</source>
<target>Rögzített órák</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Új ügyfél alapértelmezett értékei</target>
</trans-unit>
<trans-unit id="label.timesheet.mode_duration_only">
<source>label.timesheet.mode_duration_only</source>
<target>"Csak időtartam" mód - a befejezés mezőt kicseréli időtartamra</target>
@@ -26,10 +22,6 @@
<source>label.timesheet.active_entries.hard_limit</source>
<target>Egyszerre futtatható rögzítések száma</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Felhasználó—alapértelmezett értékek</target>
</trans-unit>
<trans-unit id="invoice">
<source>invoice</source>
<target>Számlák</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Scheda attività</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Creazione clienti - valori di default</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Valori utente di default</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Tema</target>

View File

@@ -10,10 +10,6 @@
<source>timesheet</source>
<target>タイムシート</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>得意先を追加する時のデフォルト値</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>テーマ</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target state="translated">타임시트</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target state="translated">고객 생성—기본 값</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target state="translated">사용자—기본 값</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target state="translated">테마</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>Facturen</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Maak standaard klant waardens aan</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Gebruiker—standaardwaarden</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Thema</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Ewidencje</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Utwórz ustawienia domyślne dla klientów</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Ustawienia domyślne dla użytkowników</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Kompozycja</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Quadro de tempos</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Criar cliente - valores padrão</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Utilizador - valores padrão</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Tema</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Horário</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Criar cliente - Valores padrões</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Usuário - Valores padrões</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Tema</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>Pontaj</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Creaza valorile implicite pentru client</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Valori implicite pentru utilizator</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Tema</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>Счета</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Создать клиента — значения по умолчанию</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Пользователь — значения по умолчанию</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Тема</target>

View File

@@ -10,10 +10,6 @@
<source>timesheet</source>
<target>Pracovný výkaz</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Vytvorte predvolené hodnoty zákazníka</target>
</trans-unit>
<trans-unit id="label.timesheet.markdown_content">
<source>label.timesheet.markdown_content</source>
<target>Povoliť Markdown v popisoch časového rozvrhu</target>
@@ -190,10 +186,6 @@
<source>theme</source>
<target>Vzhľad</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Užívateľ-východzie nastavenia</target>
</trans-unit>
<trans-unit id="invoice">
<source>invoice</source>
<target>Faktúry</target>

View File

@@ -10,10 +10,6 @@
<source>timesheet</source>
<target state="translated">Tidrapport</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target state="translated">Skapa kund - standardvärden</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target state="translated">Tema</target>
@@ -258,10 +254,6 @@
<source>label.theme.tags_create</source>
<target>Taggar: använd automatisk komplettering vid sökning och tillåt skapande av taggar</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Användare standardvärden</target>
</trans-unit>
<trans-unit id="invoice">
<source>invoice</source>
<target>Fakturor</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target state="translated">Zaman çizelgesi</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target state="translated">Müşteri oluştur—öntanımlı değerler</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target state="translated">Kullanıcı—öntanımlı değerler</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target state="translated">Tema</target>

View File

@@ -14,14 +14,6 @@
<source>invoice</source>
<target>Hóa đơn</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>Tạo giá trị mặc định của khách hàng</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>Giá trị mặc định của người dùng</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>Chủ đề</target>

View File

@@ -10,14 +10,6 @@
<source>timesheet</source>
<target>时间表</target>
</trans-unit>
<trans-unit id="form_customer">
<source>form_customer</source>
<target>创建客户-默认值</target>
</trans-unit>
<trans-unit id="form_user">
<source>form_user</source>
<target>用户—默认值</target>
</trans-unit>
<trans-unit id="theme">
<source>theme</source>
<target>主题</target>