From b6eda64b43eb9850a65bc5fa848ad736eb1ed717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 24 Apr 2024 19:34:42 -0300 Subject: [PATCH] Replace trans filter with the t function for templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurício Meneghini Fauth --- .../column_attributes.twig | 2 +- .../columns_definitions/column_name.twig | 6 +- .../table_fields_definitions.twig | 8 +- .../templates/config/form_display/input.twig | 14 +-- .../templates/console/bookmark_content.twig | 12 +- resources/templates/console/display.twig | 108 +++++++++--------- .../templates/create_tracking_version.twig | 4 +- .../database/central_columns/main.twig | 18 +-- .../templates/database/create_table.twig | 2 +- .../database/data_dictionary/index.twig | 8 +- .../database/designer/database_tables.twig | 4 +- .../database/designer/edit_delete_pages.twig | 2 +- .../templates/database/designer/main.twig | 2 +- .../database/events/editor_form.twig | 4 +- .../templates/database/events/index.twig | 20 ++-- resources/templates/database/events/row.twig | 10 +- .../templates/database/export/index.twig | 2 +- .../templates/database/import/index.twig | 2 +- .../templates/database/operations/index.twig | 20 ++-- .../templates/database/privileges/index.twig | 16 +-- .../database/routines/editor_form.twig | 4 +- .../database/routines/execute_form.twig | 2 +- .../templates/database/routines/index.twig | 12 +- .../database/routines/parameter_row.twig | 4 +- .../templates/database/routines/row.twig | 16 +-- resources/templates/database/search/main.twig | 4 +- .../structure/body_for_table_summary.twig | 2 +- .../database/structure/check_all_tables.twig | 4 +- .../database/structure/favorite_anchor.twig | 2 +- .../templates/database/structure/index.twig | 6 +- .../structure/structure_table_row.twig | 18 +-- .../database/structure/table_header.twig | 24 ++-- .../database/structure/tracking_icon.twig | 4 +- .../templates/database/tracking/tables.twig | 14 +-- .../display/results/checkbox_and_links.twig | 8 +- .../templates/display/results/table.twig | 22 ++-- resources/templates/error/simple.twig | 4 +- resources/templates/export.twig | 10 +- resources/templates/footer.twig | 4 +- resources/templates/gis_data_editor_form.twig | 6 +- resources/templates/header.twig | 20 ++-- resources/templates/home/git_info.twig | 8 +- resources/templates/home/index.twig | 14 +-- resources/templates/home/themes.twig | 2 +- resources/templates/import.twig | 16 +-- resources/templates/indexes.twig | 14 +-- resources/templates/login/form.twig | 2 +- resources/templates/login/header.twig | 6 +- resources/templates/login/twofactor/key.twig | 6 +- .../login/twofactor/key_configure.twig | 6 +- .../login/twofactor/webauthn_creation.twig | 2 +- .../login/twofactor/webauthn_request.twig | 2 +- .../navigation/item_unhide_dialog.twig | 2 +- resources/templates/navigation/main.twig | 20 ++-- .../templates/navigation/tree/quick_warp.twig | 8 +- resources/templates/preferences/header.twig | 14 +-- .../templates/preferences/manage/error.twig | 6 +- .../templates/preferences/manage/main.twig | 14 +-- .../preferences/two_factor/confirm.twig | 2 +- .../preferences/two_factor/main.twig | 12 +- .../recent_favorite_table_favorite.twig | 2 +- .../recent_favorite_table_recent.twig | 2 +- .../templates/relation/check_relations.twig | 2 +- resources/templates/select_all.twig | 2 +- .../templates/server/databases/index.twig | 40 +++---- resources/templates/server/engines/show.twig | 2 +- .../templates/server/privileges/add_user.twig | 2 +- .../server/privileges/add_user_fieldset.twig | 2 +- .../privileges/edit_routine_privileges.twig | 2 +- .../server/privileges/initials_row.twig | 2 +- .../privileges/login_information_fields.twig | 4 +- .../server/privileges/new_user_ajax.twig | 8 +- .../server/privileges/privileges_summary.twig | 8 +- .../server/privileges/privileges_table.twig | 2 +- .../server/privileges/user_overview.twig | 2 +- .../server/privileges/user_properties.twig | 4 +- .../server/privileges/users_overview.twig | 20 ++-- .../templates/server/replication/index.twig | 2 +- .../replication/primary_add_replica_user.twig | 2 +- .../replication/primary_replication.twig | 2 +- .../replication/replica_configuration.twig | 8 +- .../server/status/advisor/index.twig | 4 +- .../server/status/monitor/index.twig | 38 +++--- .../server/status/processes/index.twig | 14 +-- .../server/status/processes/list.twig | 4 +- .../server/status/queries/index.twig | 4 +- .../templates/server/status/status/index.twig | 8 +- .../server/status/variables/index.twig | 2 +- .../templates/server/sub_page_header.twig | 2 +- .../server/user_groups/edit_user_groups.twig | 14 +-- .../server/user_groups/user_groups.twig | 2 +- .../server/user_groups/user_listings.twig | 2 +- .../templates/server/variables/index.twig | 12 +- resources/templates/setup/home/index.twig | 6 +- resources/templates/sql/bookmark.twig | 2 +- .../templates/sql/no_results_returned.twig | 2 +- resources/templates/sql/profiling_chart.twig | 2 +- .../templates/table/chart/tbl_chart.twig | 4 +- resources/templates/table/export/index.twig | 2 +- .../templates/table/find_replace/index.twig | 6 +- .../gis_visualization/gis_visualization.twig | 2 +- resources/templates/table/import/index.twig | 2 +- resources/templates/table/index_form.twig | 4 +- .../templates/table/index_rename_form.twig | 2 +- .../templates/table/insert/actions_panel.twig | 2 +- .../templates/table/insert/column_row.twig | 4 +- .../table/insert/continue_insertion_form.twig | 2 +- .../table/normalization/normalization.twig | 14 +-- .../templates/table/operations/index.twig | 18 +-- .../templates/table/operations/view.twig | 4 +- .../table/page_with_secondary_tabs.twig | 4 +- .../templates/table/privileges/index.twig | 16 +-- .../templates/table/relation/common_form.twig | 12 +- .../table/relation/foreign_key_row.twig | 12 +- resources/templates/table/search/index.twig | 6 +- .../templates/table/search/input_box.twig | 4 +- .../table/structure/display_partitions.twig | 18 +-- .../table/structure/display_structure.twig | 100 ++++++++-------- .../table/structure/display_table_stats.twig | 2 +- resources/templates/table/tracking/main.twig | 16 +-- .../tracking/structure_snapshot_columns.twig | 6 +- .../tracking/structure_snapshot_indexes.twig | 4 +- .../templates/table/zoom_search/index.twig | 6 +- resources/templates/triggers/editor_form.twig | 2 +- resources/templates/triggers/export.twig | 2 +- resources/templates/triggers/list.twig | 10 +- resources/templates/triggers/row.twig | 10 +- 127 files changed, 564 insertions(+), 580 deletions(-) diff --git a/resources/templates/columns_definitions/column_attributes.twig b/resources/templates/columns_definitions/column_attributes.twig index 228618fc2e..7c9e50e260 100644 --- a/resources/templates/columns_definitions/column_attributes.twig +++ b/resources/templates/columns_definitions/column_attributes.twig @@ -187,7 +187,7 @@ {% for move_column in move_columns %} {% endfor %} diff --git a/resources/templates/columns_definitions/column_name.twig b/resources/templates/columns_definitions/column_name.twig index b4cca7d34a..53555ef49a 100644 --- a/resources/templates/columns_definitions/column_name.twig +++ b/resources/templates/columns_definitions/column_name.twig @@ -1,7 +1,7 @@ {% set title = '' %} {% if column_meta['column_status'] is defined %} {% if column_meta['column_status']['isReferenced'] %} - {% set title = title ~ 'Referenced by %s.'|trans|format( + {% set title = title ~ t('Referenced by %s.')|format( column_meta['column_status']['references']|join(',') ) %} {% endif %} @@ -9,11 +9,11 @@ {% if title is not empty %} {% set title = title ~ '\n'|raw %} {% endif %} - {% set title = title ~ 'Is a foreign key.'|trans %} + {% set title = title ~ t('Is a foreign key.') %} {% endif %} {% endif %} {% if title is empty %} - {% set title = 'Column'|trans %} + {% set title = t('Column') %} {% endif %} {% trans 'Length/Values' %} - {{ show_hint('If column type is "enum" or "set", please enter the values using this format: \'a\',\'b\',\'c\'…
If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }} + {{ show_hint(t('If column type is "enum" or "set", please enter the values using this format: \'a\',\'b\',\'c\'…
If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').')) }} {% trans 'Default' %} - {{ show_hint('For default values, please enter just a single value, without backslash escaping or quotes, using this format: a'|trans) }} + {{ show_hint(t('For default values, please enter just a single value, without backslash escaping or quotes, using this format: a')) }} {% trans 'Collation' %} @@ -79,7 +79,7 @@ {% trans 'Browser display transformation options' %} - {{ show_hint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…
If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }} + {{ show_hint(t('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…
If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').')) }} {% trans 'Input transformation options' %} - {{ show_hint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…
If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }} + {{ show_hint(t('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…
If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').')) }} {% endif %} diff --git a/resources/templates/config/form_display/input.twig b/resources/templates/config/form_display/input.twig index e1fdd7656c..d4c5069595 100644 --- a/resources/templates/config/form_display/input.twig +++ b/resources/templates/config/form_display/input.twig @@ -7,7 +7,7 @@ {% if doc is not empty %} -
{{- get_image('b_help', 'Documentation'|trans) -}} + {{- get_image('b_help', t('Documentation')) -}} {% endif %} @@ -39,8 +39,8 @@ {% elseif type == 'select' %} {% elseif type == 'list' %} @@ -50,18 +50,18 @@ {% endif %} {% if is_setup and comment %} - {{ get_image('b_tblops', 'Comment'|trans) }} + {{ get_image('b_tblops', t('Comment')) }} {% endif %} {% if set_value %} - - {{- get_image('b_edit', 'Set value: %s'|trans|format(set_value)) -}} + + {{- get_image('b_edit', t('Set value: %s')|format(set_value)) -}} {% endif %} {% if show_restore_default %} - {{- get_image('s_reload', 'Restore default value'|trans) -}} + {{- get_image('s_reload', t('Restore default value')) -}} {% endif %} diff --git a/resources/templates/console/bookmark_content.twig b/resources/templates/console/bookmark_content.twig index 98b3ced771..260cae713b 100644 --- a/resources/templates/console/bookmark_content.twig +++ b/resources/templates/console/bookmark_content.twig @@ -4,12 +4,12 @@ {% for bookmark in bookmarks %} diff --git a/resources/templates/login/form.twig b/resources/templates/login/form.twig index 76b74fd16a..1a1585f61a 100644 --- a/resources/templates/login/form.twig +++ b/resources/templates/login/form.twig @@ -21,7 +21,7 @@
{% trans 'Language' %} - {% if 'Language'|trans != 'Language' %} + {% if t('Language') != 'Language' %} {# For non-English, display "Language" with emphasis because it's not a proper word in the current language; we show it to help people recognize the dialog #} (Language) diff --git a/resources/templates/login/header.twig b/resources/templates/login/header.twig index 645aaae2eb..6e088e79d2 100644 --- a/resources/templates/login/header.twig +++ b/resources/templates/login/header.twig @@ -7,12 +7,12 @@ -

{{ 'Welcome to %s'|trans|format('phpMyAdmin')|raw }}

+

{{ t('Welcome to %s')|format('phpMyAdmin')|raw }}

-{{ "There is a mismatch between HTTPS indicated on the server and client. This can lead to a non working phpMyAdmin or a security risk. Please fix your server configuration to indicate HTTPS properly."|trans|error }} +{{ t('There is a mismatch between HTTPS indicated on the server and client. This can lead to a non working phpMyAdmin or a security risk. Please fix your server configuration to indicate HTTPS properly.')|error }}
diff --git a/resources/templates/login/twofactor/key.twig b/resources/templates/login/twofactor/key.twig index e584fe5758..dc2ce71002 100644 --- a/resources/templates/login/twofactor/key.twig +++ b/resources/templates/login/twofactor/key.twig @@ -1,9 +1,9 @@ {% include 'login/twofactor/key-https-warning.twig' %}

diff --git a/resources/templates/login/twofactor/key_configure.twig b/resources/templates/login/twofactor/key_configure.twig index 8d6113e178..1f138feac6 100644 --- a/resources/templates/login/twofactor/key_configure.twig +++ b/resources/templates/login/twofactor/key_configure.twig @@ -1,9 +1,9 @@ {% include 'login/twofactor/key-https-warning.twig' %}

diff --git a/resources/templates/login/twofactor/webauthn_creation.twig b/resources/templates/login/twofactor/webauthn_creation.twig index 552a966976..b3bcf37bab 100644 --- a/resources/templates/login/twofactor/webauthn_creation.twig +++ b/resources/templates/login/twofactor/webauthn_creation.twig @@ -1,3 +1,3 @@ -

{{ 'Please connect your WebAuthn/FIDO2 device. Then confirm registration on the device.'|trans }}

+

{{ t('Please connect your WebAuthn/FIDO2 device. Then confirm registration on the device.') }}

diff --git a/resources/templates/login/twofactor/webauthn_request.twig b/resources/templates/login/twofactor/webauthn_request.twig index 5b13e7c246..3a5f84a5cf 100644 --- a/resources/templates/login/twofactor/webauthn_request.twig +++ b/resources/templates/login/twofactor/webauthn_request.twig @@ -1,3 +1,3 @@ -

{{ 'Please connect your WebAuthn/FIDO2 device. Then confirm login on the device.'|trans }}

+

{{ t('Please connect your WebAuthn/FIDO2 device. Then confirm login on the device.') }}

diff --git a/resources/templates/navigation/item_unhide_dialog.twig b/resources/templates/navigation/item_unhide_dialog.twig index a038e7c04c..49be65e26d 100644 --- a/resources/templates/navigation/item_unhide_dialog.twig +++ b/resources/templates/navigation/item_unhide_dialog.twig @@ -16,7 +16,7 @@ 'itemType': type, 'itemName': item, 'dbName': database - }, '', false) }}">{{ get_icon('show', 'Unhide'|trans) }} + }, '', false) }}">{{ get_icon('show', t('Unhide')) }} {% endfor %} diff --git a/resources/templates/navigation/main.twig b/resources/templates/navigation/main.twig index 1ca3b6e015..8c8eb0678f 100644 --- a/resources/templates/navigation/main.twig +++ b/resources/templates/navigation/main.twig @@ -23,29 +23,29 @@ @@ -55,7 +55,7 @@
{% endif %} - {{ get_image('ajax_clock_small', 'Loading…'|trans, { + {{ get_image('ajax_clock_small', t('Loading…'), { 'style': 'visibility: hidden; display:none', 'class': 'throbber' }) }} @@ -64,7 +64,7 @@ {% endif %} {% if not navigation_tree %} - {{ 'An error has occurred while loading the navigation display'|trans|error }} + {{ t('An error has occurred while loading the navigation display')|error }} {% else %} {{ navigation_tree|raw }} {% endif %} diff --git a/resources/templates/navigation/tree/quick_warp.twig b/resources/templates/navigation/tree/quick_warp.twig index 655f36a806..46e30d38da 100644 --- a/resources/templates/navigation/tree/quick_warp.twig +++ b/resources/templates/navigation/tree/quick_warp.twig @@ -2,8 +2,8 @@
{% if recent is not empty %}

- +
@@ -55,7 +55,7 @@ {% trans 'More settings' %}
- {{ 'You can set more settings by modifying config.inc.php, eg. by using %sSetup script%s.'|trans|format('', '')|raw }} + {{ t('You can set more settings by modifying config.inc.php, eg. by using %sSetup script%s.')|format('', '')|raw }} {{ show_docu('setup', 'setup-script') }}
@@ -68,7 +68,7 @@
- {{ 'Configuration has been saved.'|trans|raw_success }} + {{ t('Configuration has been saved.')|raw_success }}
@@ -100,7 +100,7 @@
- {{ 'This feature is not supported by your web browser'|trans|notice }} + {{ t('This feature is not supported by your web browser')|notice }}

diff --git a/resources/templates/preferences/two_factor/confirm.twig b/resources/templates/preferences/two_factor/confirm.twig index 23d6fc31c1..f6cf7137b2 100644 --- a/resources/templates/preferences/two_factor/confirm.twig +++ b/resources/templates/preferences/two_factor/confirm.twig @@ -6,7 +6,7 @@
- {{ "By disabling two factor authentication you will be again able to login using password only."|trans|notice }} + {{ t('By disabling two factor authentication you will be again able to login using password only.')|notice }} {{ get_hidden_inputs() }} {{ form|raw }} diff --git a/resources/templates/preferences/two_factor/main.twig b/resources/templates/preferences/two_factor/main.twig index e1b2c76710..a866a414c8 100644 --- a/resources/templates/preferences/two_factor/main.twig +++ b/resources/templates/preferences/two_factor/main.twig @@ -23,8 +23,8 @@ {% endif %} {% if missing|length > 0 %}

- {{ 'Please install optional dependencies to enable more authentication backends.'|trans }} - {{ 'Following composer packages are missing:'|trans }} + {{ t('Please install optional dependencies to enable more authentication backends.') }} + {{ t('Following composer packages are missing:') }}

    {% for item in missing %} @@ -53,10 +53,10 @@

    {{ backend_description }}

    {% if backend_id == 'key' %} {% endif %} @@ -87,7 +87,7 @@

    {%- if backend['id'] == 'key' -%} - {{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }} + {{ t('The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).') }}
    {%- endif -%} diff --git a/resources/templates/recent_favorite_table_favorite.twig b/resources/templates/recent_favorite_table_favorite.twig index a5d59ea215..1b13c08a24 100644 --- a/resources/templates/recent_favorite_table_favorite.twig +++ b/resources/templates/recent_favorite_table_favorite.twig @@ -1,6 +1,6 @@ {% if tables is empty %}

  • - {{ 'There are no favorite tables.'|trans }} + {{ t('There are no favorite tables.') }}
  • {% else %} {% for table in tables %} diff --git a/resources/templates/recent_favorite_table_recent.twig b/resources/templates/recent_favorite_table_recent.twig index 95c261ddbb..702a761877 100644 --- a/resources/templates/recent_favorite_table_recent.twig +++ b/resources/templates/recent_favorite_table_recent.twig @@ -1,6 +1,6 @@ {% if tables is empty %}
  • - {{ 'There are no recent tables.'|trans }} + {{ t('There are no recent tables.') }}
  • {% else %} {% for table in tables %} diff --git a/resources/templates/relation/check_relations.twig b/resources/templates/relation/check_relations.twig index 6b12de04ad..d892ed745d 100644 --- a/resources/templates/relation/check_relations.twig +++ b/resources/templates/relation/check_relations.twig @@ -520,7 +520,7 @@
    • - {{ 'Create the needed tables with the %screate_tables.sql.'|trans|format(sql_dir|e)|raw }} + {{ t('Create the needed tables with the %screate_tables.sql.')|format(sql_dir|e)|raw }} {{ show_docu('setup', 'linked-tables') }}
    • diff --git a/resources/templates/select_all.twig b/resources/templates/select_all.twig index 4d1fcd8801..e7a1230f57 100644 --- a/resources/templates/select_all.twig +++ b/resources/templates/select_all.twig @@ -1,4 +1,4 @@ -{{ get_image('select_all_arrow', 'With selected:'|trans, {'dir': text_dir, 'width': '38', 'height': '22'}) }} +{{ get_image('select_all_arrow', t('With selected:'), {'dir': text_dir, 'width': '38', 'height': '22'}) }} diff --git a/resources/templates/server/databases/index.twig b/resources/templates/server/databases/index.twig index 90bd37310e..7371db1777 100644 --- a/resources/templates/server/databases/index.twig +++ b/resources/templates/server/databases/index.twig @@ -1,12 +1,12 @@

      - {{ get_icon('s_db', has_statistics ? 'Databases statistics'|trans : 'Databases'|trans) }} + {{ get_icon('s_db', has_statistics ? t('Databases statistics') : t('Databases')) }}

      {% if is_create_database_shown %}
      - {{ get_icon('b_newdb', 'Create database'|trans) }} + {{ get_icon('b_newdb', t('Create database')) }} {{ show_mysql_docu('CREATE_DATABASE') }}
      @@ -47,7 +47,7 @@
      {% else %} - {{ get_icon('s_error', 'No privileges to create databases'|trans) }} + {{ get_icon('s_error', t('No privileges to create databases')) }} {% endif %}
      @@ -65,7 +65,7 @@
@@ -73,7 +73,7 @@
- {{ get_image('b_search', 'Search'|trans) }} + {{ get_image('b_search', t('Search')) }}
@@ -106,9 +106,9 @@ {% trans 'Database' %} {% if url_params.sort_by == 'SCHEMA_NAME' %} {% if url_params.sort_order == 'asc' %} - {{ get_image('s_asc', 'Ascending'|trans) }} + {{ get_image('s_asc', t('Ascending')) }} {% else %} - {{ get_image('s_desc', 'Descending'|trans) }} + {{ get_image('s_desc', t('Descending')) }} {% endif %} {% endif %} @@ -123,9 +123,9 @@ {% trans 'Collation' %} {% if url_params.sort_by == 'DEFAULT_COLLATION_NAME' %} {% if url_params.sort_order == 'asc' %} - {{ get_image('s_asc', 'Ascending'|trans) }} + {{ get_image('s_asc', t('Ascending')) }} {% else %} - {{ get_image('s_desc', 'Descending'|trans) }} + {{ get_image('s_desc', t('Descending')) }} {% endif %} {% endif %} @@ -142,9 +142,9 @@ {{ statistic.title }} {% if url_params.sort_by == name %} {% if url_params.sort_order == 'asc' %} - {{ get_image('s_asc', 'Ascending'|trans) }} + {{ get_image('s_asc', t('Ascending')) }} {% else %} - {{ get_image('s_desc', 'Descending'|trans) }} + {{ get_image('s_desc', t('Descending')) }} {% endif %} {% endif %} @@ -178,7 +178,7 @@ + {{- t("Jump to database '%s'")|format(database.name) }}"> {{ database.name }} @@ -212,11 +212,11 @@ {% if database.replication.primary.status %} {% if database.replication.primary.is_replicated %} - {{ get_icon('s_success', 'Replicated'|trans) }} + {{ get_icon('s_success', t('Replicated')) }} {% else %} - {{ get_icon('s_cancel', 'Not replicated'|trans) }} + {{ get_icon('s_cancel', t('Not replicated')) }} {% endif %} {% endif %} @@ -224,19 +224,19 @@ {% if database.replication.replica.status %} {% if database.replication.replica.is_replicated %} - {{ get_icon('s_success', 'Replicated'|trans) }} + {{ get_icon('s_success', t('Replicated')) }} {% else %} - {{ get_icon('s_cancel', 'Not replicated'|trans) }} + {{ get_icon('s_cancel', t('Not replicated')) }} {% endif %} {% endif %} - {{ get_icon('s_rights', 'Check privileges'|trans) }} + {{- t('Check privileges for database "%s".')|format(database.name) }}"> + {{ get_icon('s_rights', t('Check privileges')) }} @@ -291,7 +291,7 @@
{% trans 'Enable statistics' %} @@ -301,7 +301,7 @@ {% endif %} {% else %} {% endif %}
diff --git a/resources/templates/server/engines/show.twig b/resources/templates/server/engines/show.twig index d4639038a7..ccd2066239 100644 --- a/resources/templates/server/engines/show.twig +++ b/resources/templates/server/engines/show.twig @@ -42,5 +42,5 @@ {{ engine.variables|raw }} {% endif %} {% else %} -

{{ 'Unknown storage engine.'|trans|error }}

+

{{ t('Unknown storage engine.')|error }}

{% endif %} diff --git a/resources/templates/server/privileges/add_user.twig b/resources/templates/server/privileges/add_user.twig index 565fe8b5a9..ac81bc28cb 100644 --- a/resources/templates/server/privileges/add_user.twig +++ b/resources/templates/server/privileges/add_user.twig @@ -22,7 +22,7 @@ {% if database is not empty %} - +
{% endif %} diff --git a/resources/templates/server/privileges/add_user_fieldset.twig b/resources/templates/server/privileges/add_user_fieldset.twig index d682e4442b..1f661eea5d 100644 --- a/resources/templates/server/privileges/add_user_fieldset.twig +++ b/resources/templates/server/privileges/add_user_fieldset.twig @@ -2,7 +2,7 @@
{% trans %}New{% context %}Create new user{% endtrans %}
diff --git a/resources/templates/server/privileges/edit_routine_privileges.twig b/resources/templates/server/privileges/edit_routine_privileges.twig index af6179d4e1..31a42fd107 100644 --- a/resources/templates/server/privileges/edit_routine_privileges.twig +++ b/resources/templates/server/privileges/edit_routine_privileges.twig @@ -31,7 +31,7 @@ {% if current_user == username ~ '@' ~ hostname %} - {{ 'Note: You are attempting to edit privileges of the user with which you are currently logged in.'|trans|notice }} + {{ t('Note: You are attempting to edit privileges of the user with which you are currently logged in.')|notice }} {% endif %} diff --git a/resources/templates/table/structure/display_table_stats.twig b/resources/templates/table/structure/display_table_stats.twig index 2f0a355f72..9d8618baba 100644 --- a/resources/templates/table/structure/display_table_stats.twig +++ b/resources/templates/table/structure/display_table_stats.twig @@ -65,7 +65,7 @@ 'sql_query': 'OPTIMIZE TABLE ' ~ backquote(table), 'pos': 0 }) }}"> - {{ get_icon('b_tbloptimize', 'Optimize table'|trans) }} + {{ get_icon('b_tbloptimize', t('Optimize table')) }} diff --git a/resources/templates/table/tracking/main.twig b/resources/templates/table/tracking/main.twig index 0cbdc01266..0ef969f43a 100644 --- a/resources/templates/table/tracking/main.twig +++ b/resources/templates/table/tracking/main.twig @@ -61,7 +61,7 @@ 'version': version['version'], 'submit_delete_version': true }), '', false) }}"> - {{ get_icon('b_drop', 'Delete version'|trans) }} + {{ get_icon('b_drop', t('Delete version')) }} @@ -70,14 +70,14 @@ 'version': version['version'], 'report': 'true' }), '', false) }}"> - {{ get_icon('b_report', 'Tracking report'|trans) }} + {{ get_icon('b_report', t('Tracking report')) }} - {{ get_icon('b_props', 'Structure snapshot'|trans) }} + {{ get_icon('b_props', t('Structure snapshot')) }} @@ -89,7 +89,7 @@ 'form_name': 'versionsForm', } only %} {% set last_version_element = versions|first %} @@ -97,13 +97,13 @@ {{ get_hidden_inputs(db, table) }}
{% if last_version_element['tracking_active'] == 0 %} - {% set legend = 'Activate tracking for %s'|trans %} + {% set legend = t('Activate tracking for %s') %} {% set value = 'activate_now' %} - {% set button = 'Activate now'|trans %} + {% set button = t('Activate now') %} {% else %} - {% set legend = 'Deactivate tracking for %s'|trans %} + {% set legend = t('Deactivate tracking for %s') %} {% set value = 'deactivate_now' %} - {% set button = 'Deactivate now'|trans %} + {% set button = t('Deactivate now') %} {% endif %} {{ legend|format(db ~ '.' ~ table) }} diff --git a/resources/templates/table/tracking/structure_snapshot_columns.twig b/resources/templates/table/tracking/structure_snapshot_columns.twig index f6a86cb375..ba26827da3 100644 --- a/resources/templates/table/tracking/structure_snapshot_columns.twig +++ b/resources/templates/table/tracking/structure_snapshot_columns.twig @@ -22,15 +22,15 @@ {{ field['Field'] }} {% if field['Key'] == 'PRI' %} - {{ get_image('b_primary', 'Primary'|trans) }} + {{ get_image('b_primary', t('Primary')) }} {% elseif field['Key'] is not empty %} - {{ get_image('bd_primary', 'Index'|trans) }} + {{ get_image('bd_primary', t('Index')) }} {% endif %} {{ field['Type'] }} {{ field['Collation'] }} - {{ field['Null'] == 'YES' ? 'Yes'|trans : 'No'|trans }} + {{ field['Null'] == 'YES' ? t('Yes') : t('No') }} {% if field['Default'] is defined %} {% set extracted_columnspec = extract_column_spec(field['Type']) %} diff --git a/resources/templates/table/tracking/structure_snapshot_indexes.twig b/resources/templates/table/tracking/structure_snapshot_indexes.twig index e83718cfb4..65b35c8050 100644 --- a/resources/templates/table/tracking/structure_snapshot_indexes.twig +++ b/resources/templates/table/tracking/structure_snapshot_indexes.twig @@ -20,8 +20,8 @@ {{ index['Key_name'] }} {{ index['Index_type'] }} - {{ index['Non_unique'] == 0 ? 'Yes'|trans : 'No'|trans }} - {{ index['Packed'] != '' ? 'Yes'|trans : 'No'|trans }} + {{ index['Non_unique'] == 0 ? t('Yes') : t('No') }} + {{ index['Packed'] != '' ? t('Yes') : t('No') }} {{ index['Column_name'] }} {{ index['Cardinality'] }} {{ index['Collation'] }} diff --git a/resources/templates/table/zoom_search/index.twig b/resources/templates/table/zoom_search/index.twig index de3c6e144a..190940776c 100644 --- a/resources/templates/table/zoom_search/index.twig +++ b/resources/templates/table/zoom_search/index.twig @@ -1,19 +1,19 @@ diff --git a/resources/templates/triggers/editor_form.twig b/resources/templates/triggers/editor_form.twig index ad53ff8239..653117d805 100644 --- a/resources/templates/triggers/editor_form.twig +++ b/resources/templates/triggers/editor_form.twig @@ -61,7 +61,7 @@ {% trans 'Definition' %}
- + {% trans 'Definer' %} diff --git a/resources/templates/triggers/export.twig b/resources/templates/triggers/export.twig index 7a73097943..d6494d0561 100644 --- a/resources/templates/triggers/export.twig +++ b/resources/templates/triggers/export.twig @@ -1,5 +1,5 @@
-

{{ 'Export of trigger %s'|trans|format(backquote(item_name)) }}

+

{{ t('Export of trigger %s')|format(backquote(item_name)) }}

diff --git a/resources/templates/triggers/list.twig b/resources/templates/triggers/list.twig index adb84c2ec6..192972e482 100644 --- a/resources/templates/triggers/list.twig +++ b/resources/templates/triggers/list.twig @@ -1,6 +1,6 @@

- {{ get_icon('b_triggers', 'Triggers'|trans) }} + {{ get_icon('b_triggers', t('Triggers')) }} {{ show_mysql_docu('TRIGGERS') }}

@@ -15,10 +15,10 @@
@@ -26,7 +26,7 @@ - {{ get_icon('b_trigger_add', 'Create new trigger'|trans) }} + {{ get_icon('b_trigger_add', t('Create new trigger')) }}
@@ -37,7 +37,7 @@ {{ get_hidden_inputs(db, table) }}
- {{ 'There are no triggers to display.'|trans|notice }} + {{ t('There are no triggers to display.')|notice }}
diff --git a/resources/templates/triggers/row.twig b/resources/templates/triggers/row.twig index 763f675520..965d239d41 100644 --- a/resources/templates/triggers/row.twig +++ b/resources/templates/triggers/row.twig @@ -25,10 +25,10 @@ 'edit_item': true, 'item_name': trigger.name.getName() }) }}"> - {{ get_icon('b_edit', 'Edit'|trans) }} + {{ get_icon('b_edit', t('Edit')) }} {% else %} - {{ get_icon('bd_edit', 'Edit'|trans) }} + {{ get_icon('bd_edit', t('Edit')) }} {% endif %}
@@ -38,7 +38,7 @@ 'export_item': true, 'item_name': trigger.name.getName() }) }}"> - {{ get_icon('b_export', 'Export'|trans) }} + {{ get_icon('b_export', t('Export')) }} @@ -51,11 +51,11 @@ 'sql_query': trigger.getDropSql(), 'goto': url('/triggers', {'db': db}) }, - get_icon('b_drop', 'Drop'|trans), + get_icon('b_drop', t('Drop')), {'class': 'ajax drop_anchor'} ) }} {% else %} - {{ get_icon('bd_drop', 'Drop'|trans) }} + {{ get_icon('bd_drop', t('Drop')) }} {% endif %}