Replace trans filter with the t function for templates

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2024-04-24 19:34:42 -03:00
parent b2c9cbc2ed
commit b6eda64b43
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
127 changed files with 564 additions and 580 deletions

View File

@ -187,7 +187,7 @@
{% for move_column in move_columns %}
<option value="{{ move_column.name }}"
{{- current_index == loop.index0 or current_index == loop.index0 + 1 ? ' disabled' }}>
{{ 'after %s'|trans|format(backquote(move_column.name|e)) }}
{{ t('after %s')|format(backquote(move_column.name|e)) }}
</option>
{% endfor %}
</select>

View File

@ -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 %}
<input id="field_{{ column_number }}_{{ ci - ci_offset }}"

View File

@ -14,11 +14,11 @@
</th>
<th>
{% trans 'Length/Values' %}
{{ show_hint('If column type is "enum" or "set", please enter the values using this format: \'a\',\'b\',\'c\'…<br>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\'…<br>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\').')) }}
</th>
<th>
{% 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')) }}
</th>
<th>
{% trans 'Collation' %}
@ -79,7 +79,7 @@
</th>
<th>
{% trans 'Browser display transformation options' %}
{{ show_hint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…<br>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\'…<br>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\').')) }}
</th>
<th>
<a href="{{ url('/transformation/overview') }}#input_transformation"
@ -90,7 +90,7 @@
</th>
<th>
{% trans 'Input transformation options' %}
{{ show_hint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…<br>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\'…<br>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\').')) }}
</th>
{% endif %}
</tr>

View File

@ -7,7 +7,7 @@
{% if doc is not empty %}
<span class="doc">
<a href="{{ doc }}" target="documentation">{{- get_image('b_help', 'Documentation'|trans) -}}</a>
<a href="{{ doc }}" target="documentation">{{- get_image('b_help', t('Documentation')) -}}</a>
</span>
{% endif %}
@ -39,8 +39,8 @@
{% elseif type == 'select' %}
<select name="{{ path }}" id="{{ path }}" class="w-75{{ not value_is_default ? (has_errors ? ' custom field-error' : ' custom') }}">
{% for key, val in select_values %}
{% if val is same as(true) %}{% set val = 'Yes'|trans %}{% elseif val is same as(false) %}{% set val = 'No'|trans %}{% endif %}
<option value="{{ key }}"{{ val is empty ? ' label="' ~ 'None'|trans ~ '"' }}{{ key is same as(value) or (value is same as(true) and key is same as(1)) or (value is same as(false) and key is same as(0)) ? ' selected' }}{{ key in select_values_disabled ? ' disabled' }}>{{ val }}</option>
{% if val is same as(true) %}{% set val = t('Yes') %}{% elseif val is same as(false) %}{% set val = t('No') %}{% endif %}
<option value="{{ key }}"{{ val is empty ? ' label="' ~ t('None') ~ '"' }}{{ key is same as(value) or (value is same as(true) and key is same as(1)) or (value is same as(false) and key is same as(0)) ? ' selected' }}{{ key in select_values_disabled ? ' disabled' }}>{{ val }}</option>
{% endfor %}
</select>
{% elseif type == 'list' %}
@ -50,18 +50,18 @@
{% endif %}
{% if is_setup and comment %}
<a class="userprefs-comment" title="{{ comment }}">{{ get_image('b_tblops', 'Comment'|trans) }}</a>
<a class="userprefs-comment" title="{{ comment }}">{{ get_image('b_tblops', t('Comment')) }}</a>
{% endif %}
{% if set_value %}
<a class="set-value hide" href="#{{ path }}={{ set_value }}" title="{{ 'Set value: %s'|trans|format(set_value) }}">
{{- get_image('b_edit', 'Set value: %s'|trans|format(set_value)) -}}
<a class="set-value hide" href="#{{ path }}={{ set_value }}" title="{{ t('Set value: %s')|format(set_value) }}">
{{- get_image('b_edit', t('Set value: %s')|format(set_value)) -}}
</a>
{% endif %}
{% if show_restore_default %}
<a class="restore-default hide" href="#{{ path }}" title="{% trans 'Restore default value' %}">
{{- get_image('s_reload', 'Restore default value'|trans) -}}
{{- get_image('s_reload', t('Restore default value')) -}}
</a>
{% endif %}

View File

@ -4,12 +4,12 @@
{% for bookmark in bookmarks %}
<div class="message collapsed bookmark" bookmarkid="{{ bookmark.getId() }}" targetdb="{{ bookmark.getDatabase() }}">
<div class="action_content">
<span class="action collapse">{{ 'Collapse'|trans }}</span>
<span class="action expand">{{ 'Expand'|trans }}</span>
<span class="action requery">{{ 'Requery'|trans }}</span>
<span class="action edit_bookmark">{{ 'Edit'|trans }}</span>
<span class="action delete_bookmark">{{ 'Delete'|trans }}</span>
<span class="text targetdb">{{ 'Database'|trans }}: <span>{{ bookmark.getDatabase() }}</span></span>
<span class="action collapse">{{ t('Collapse') }}</span>
<span class="action expand">{{ t('Expand') }}</span>
<span class="action requery">{{ t('Requery') }}</span>
<span class="action edit_bookmark">{{ t('Edit') }}</span>
<span class="action delete_bookmark">{{ t('Delete') }}</span>
<span class="text targetdb">{{ t('Database') }}: <span>{{ bookmark.getDatabase() }}</span></span>
</div>
<span class="bookmark_label{{ bookmark.getUser() is empty ? ' shared' }}">{{ bookmark.getLabel() }}</span>

View File

@ -12,26 +12,26 @@
data-order="{{ settings.Order }}">
<div class="toolbar collapsed">
<div class="switch_button console_switch">
{{ get_image('console', 'SQL Query Console'|trans) }}
<span>{{ 'Console'|trans }}</span>
{{ get_image('console', t('SQL Query Console')) }}
<span>{{ t('Console') }}</span>
</div>
<div class="button clear">
<span>{{ 'Clear'|trans }}</span>
<span>{{ t('Clear') }}</span>
</div>
<div class="button history">
<span>{{ 'History'|trans }}</span>
<span>{{ t('History') }}</span>
</div>
<div class="button options">
<span>{{ 'Options'|trans }}</span>
<span>{{ t('Options') }}</span>
</div>
{% if has_bookmark_feature %}
<div class="button bookmarks">
<span>{{ 'Bookmarks'|trans }}</span>
<span>{{ t('Bookmarks') }}</span>
</div>
{% endif %}
{% if debug %}
<div class="button debug hide">
<span>{{ 'Debug SQL'|trans }}</span>
<span>{{ t('Debug SQL') }}</span>
</div>
{% endif %}
</div>
@ -47,18 +47,18 @@
{% for record in sql_history|reverse %}
<div class="message history collapsed hide{{ record['sqlquery'] matches '@^SELECT[[:space:]]+@i' ? ' select' }}" targetdb="{{ record['db'] }}" targettable="{{ record['table'] }}">
<div class="action_content">
<span class="action collapse">{{ 'Collapse'|trans }}</span>
<span class="action expand">{{ 'Expand'|trans }}</span>
<span class="action requery">{{ 'Requery'|trans }}</span>
<span class="action edit">{{ 'Edit'|trans }}</span>
<span class="action explain">{{ 'Explain'|trans }}</span>
<span class="action profiling">{{ 'Profiling'|trans }}</span>
<span class="action collapse">{{ t('Collapse') }}</span>
<span class="action expand">{{ t('Expand') }}</span>
<span class="action requery">{{ t('Requery') }}</span>
<span class="action edit">{{ t('Edit') }}</span>
<span class="action explain">{{ t('Explain') }}</span>
<span class="action profiling">{{ t('Profiling') }}</span>
{% if has_bookmark_feature %}
<span class="action bookmark">{{ 'Bookmark'|trans }}</span>
<span class="action bookmark">{{ t('Bookmark') }}</span>
{% endif %}
<span class="text failed">{{ 'Query failed'|trans }}</span>
<span class="text targetdb">{{ 'Database'|trans }}: <span>{{ record['db'] }}</span></span>
<span class="text query_time">{{ 'Queried time'|trans }}: <span>{{ record['timevalue'] is defined ? record['timevalue'] : 'During current session'|trans }}</span></span>
<span class="text failed">{{ t('Query failed') }}</span>
<span class="text targetdb">{{ t('Database') }}: <span>{{ record['db'] }}</span></span>
<span class="text query_time">{{ t('Queried time') }}: <span>{{ record['timevalue'] is defined ? record['timevalue'] : t('During current session') }}</span></span>
</div>
<span class="query">{{ record['sqlquery'] }}</span>
@ -76,34 +76,34 @@
<div class="card" id="debug_console">
<div class="toolbar">
<div class="button order order_asc">
<span>{{ 'ascending'|trans }}</span>
<span>{{ t('ascending') }}</span>
</div>
<div class="button order order_desc">
<span>{{ 'descending'|trans }}</span>
<span>{{ t('descending') }}</span>
</div>
<div class="text">
<span>{{ 'Order:'|trans }}</span>
<span>{{ t('Order:') }}</span>
</div>
<div class="switch_button">
<span>{{ 'Debug SQL'|trans }}</span>
<span>{{ t('Debug SQL') }}</span>
</div>
<div class="button order_by sort_count">
<span>{{ 'Count'|trans }}</span>
<span>{{ t('Count') }}</span>
</div>
<div class="button order_by sort_exec">
<span>{{ 'Execution order'|trans }}</span>
<span>{{ t('Execution order') }}</span>
</div>
<div class="button order_by sort_time">
<span>{{ 'Time taken'|trans }}</span>
<span>{{ t('Time taken') }}</span>
</div>
<div class="text">
<span>{{ 'Order by:'|trans }}</span>
<span>{{ t('Order by:') }}</span>
</div>
<div class="button group_queries">
<span>{{ 'Group queries'|trans }}</span>
<span>{{ t('Group queries') }}</span>
</div>
<div class="button ungroup_queries">
<span>{{ 'Ungroup queries'|trans }}</span>
<span>{{ t('Ungroup queries') }}</span>
</div>
</div>
@ -113,12 +113,12 @@
</div> <!-- Content -->
<div class="templates">
<div class="debug_query action_content">
<span class="action collapse">{{ 'Collapse'|trans }}</span>
<span class="action expand">{{ 'Expand'|trans }}</span>
<span class="action dbg_show_trace">{{ 'Show trace'|trans }}</span>
<span class="action dbg_hide_trace">{{ 'Hide trace'|trans }}</span>
<span class="text count hide">{{ 'Count:'|trans }} <span></span></span>
<span class="text time">{{ 'Time taken:'|trans }} <span></span></span>
<span class="action collapse">{{ t('Collapse') }}</span>
<span class="action expand">{{ t('Expand') }}</span>
<span class="action dbg_show_trace">{{ t('Show trace') }}</span>
<span class="action dbg_hide_trace">{{ t('Hide trace') }}</span>
<span class="text count hide">{{ t('Count:') }} <span></span></span>
<span class="text time">{{ t('Time taken:') }} <span></span></span>
</div>
</div> <!-- Template -->
@ -127,13 +127,13 @@
<div class="card" id="pma_bookmarks">
<div class="toolbar">
<div class="switch_button">
<span>{{ 'Bookmarks'|trans }}</span>
<span>{{ t('Bookmarks') }}</span>
</div>
<div class="button refresh">
<span>{{ 'Refresh'|trans }}</span>
<span>{{ t('Refresh') }}</span>
</div>
<div class="button add">
<span>{{ 'Add'|trans }}</span>
<span>{{ t('Add') }}</span>
</div>
</div>
@ -144,7 +144,7 @@
<div class="card add">
<div class="toolbar">
<div class="switch_button">
<span>{{ 'Add bookmark'|trans }}</span>
<span>{{ t('Add bookmark') }}</span>
</div>
</div>
@ -172,51 +172,51 @@
<div class="card" id="pma_console_options">
<div class="toolbar">
<div class="switch_button">
<span>{{ 'Options'|trans }}</span>
<span>{{ t('Options') }}</span>
</div>
<div class="button default">
<span>{{ 'Restore default values'|trans }}</span>
<span>{{ t('Restore default values') }}</span>
</div>
</div>
<div class="content">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="consoleOptionsAlwaysExpandCheckbox" name="always_expand"{{ settings.AlwaysExpand ? ' checked' }}>
<label class="form-check-label" for="consoleOptionsAlwaysExpandCheckbox">{{ 'Always expand query messages'|trans }}</label>
<label class="form-check-label" for="consoleOptionsAlwaysExpandCheckbox">{{ t('Always expand query messages') }}</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="consoleOptionsStartHistoryCheckbox" name="start_history"{{ settings.StartHistory ? ' checked' }}>
<label class="form-check-label" for="consoleOptionsStartHistoryCheckbox">{{ 'Show query history at start'|trans }}</label>
<label class="form-check-label" for="consoleOptionsStartHistoryCheckbox">{{ t('Show query history at start') }}</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="consoleOptionsCurrentQueryCheckbox" name="current_query"{{ settings.CurrentQuery ? ' checked' }}>
<label class="form-check-label" for="consoleOptionsCurrentQueryCheckbox">{{ 'Show current browsing query'|trans }}</label>
<label class="form-check-label" for="consoleOptionsCurrentQueryCheckbox">{{ t('Show current browsing query') }}</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="consoleOptionsEnterExecutesCheckbox" name="enter_executes"{{ settings.EnterExecutes ? ' checked' }}>
<label class="form-check-label" for="consoleOptionsEnterExecutesCheckbox">{{ 'Execute queries on Enter and insert new line with Shift+Enter. To make this permanent, view settings.'|trans }}</label>
<label class="form-check-label" for="consoleOptionsEnterExecutesCheckbox">{{ t('Execute queries on Enter and insert new line with Shift+Enter. To make this permanent, view settings.') }}</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="consoleOptionsDarkThemeCheckbox" name="dark_theme"{{ settings.DarkTheme ? ' checked' }}>
<label class="form-check-label" for="consoleOptionsDarkThemeCheckbox">{{ 'Switch to dark theme'|trans }}</label>
<label class="form-check-label" for="consoleOptionsDarkThemeCheckbox">{{ t('Switch to dark theme') }}</label>
</div>
</div>
</div> <!-- Options card -->
<div class="templates">
{# Templates for console message actions #}
<div class="query_actions">
<span class="action collapse">{{ 'Collapse'|trans }}</span>
<span class="action expand">{{ 'Expand'|trans }}</span>
<span class="action requery">{{ 'Requery'|trans }}</span>
<span class="action edit">{{ 'Edit'|trans }}</span>
<span class="action explain">{{ 'Explain'|trans }}</span>
<span class="action profiling">{{ 'Profiling'|trans }}</span>
<span class="action collapse">{{ t('Collapse') }}</span>
<span class="action expand">{{ t('Expand') }}</span>
<span class="action requery">{{ t('Requery') }}</span>
<span class="action edit">{{ t('Edit') }}</span>
<span class="action explain">{{ t('Explain') }}</span>
<span class="action profiling">{{ t('Profiling') }}</span>
{% if has_bookmark_feature %}
<span class="action bookmark">{{ 'Bookmark'|trans }}</span>
<span class="action bookmark">{{ t('Bookmark') }}</span>
{% endif %}
<span class="text failed">{{ 'Query failed'|trans }}</span>
<span class="text targetdb">{{ 'Database'|trans }}: <span></span></span>
<span class="text query_time">{{ 'Queried time'|trans }}: <span></span></span>
<span class="text failed">{{ t('Query failed') }}</span>
<span class="text targetdb">{{ t('Database') }}: <span></span></span>
<span class="text query_time">{{ t('Queried time') }}: <span></span></span>
</div>
</div>
</div> <!-- #console end -->

View File

@ -7,12 +7,12 @@
<div class="card-header">
{% if selected|length == 1 %}
{{ 'Create version %1$s of %2$s'|trans|format(
{{ t('Create version %1$s of %2$s')|format(
last_version + 1,
db ~ '.' ~ selected[0]
) }}
{% else %}
{{ 'Create version %1$s'|trans|format(last_version + 1) }}
{{ t('Create version %1$s')|format(last_version + 1) }}
{% endif %}
</div>

View File

@ -181,7 +181,7 @@
<tr>
<td class="navigation_separator largescreenonly"></td>
<td class="central_columns_navigation">
{{ get_icon('centralColumns_add', 'Add column'|trans)|raw }}
{{ get_icon('centralColumns_add', t('Add column'))|raw }}
<form id="add_column" action="{{ url('/database/central-columns') }}" method="post">
{{ get_hidden_inputs(db)|raw }}
<input type="hidden" name="add_column" value="add">
@ -216,7 +216,7 @@
<form name="tableslistcontainer">
<table id="table_columns" class="table table-striped table-hover tablesorter w-auto">
{% set class = 'column_heading' %}
{% set title = 'Click to sort.'|trans %}
{% set title = t('Click to sort.') %}
<thead>
<tr>
<th class="{{ class }}"></th>
@ -268,14 +268,14 @@
value="{{ row['col_name'] }}" id="{{ 'checkbox_row_' ~ row_num }}">
</td>
<td id="{{ 'edit_' ~ row_num }}" class="edit text-center">
<a href="#"> {{ get_icon('b_edit', 'Edit'|trans)|raw }}</a>
<a href="#"> {{ get_icon('b_edit', t('Edit'))|raw }}</a>
</td>
<td class="del_row" data-rownum = "{{ row_num }}">
<a href="#">{{ get_icon('b_drop', 'Delete'|trans) }}</a>
<input type="submit" data-rownum = "{{ row_num }}" class="btn btn-secondary edit_cancel_form" value="{{ 'Cancel'|trans }}">
<a href="#">{{ get_icon('b_drop', t('Delete')) }}</a>
<input type="submit" data-rownum = "{{ row_num }}" class="btn btn-secondary edit_cancel_form" value="{{ t('Cancel') }}">
</td>
<td id="{{ 'save_' ~ row_num }}" class="hide">
<input type="submit" data-rownum="{{ row_num }}" class="btn btn-primary edit_save_form" value="{{ 'Save'|trans }}">
<input type="submit" data-rownum="{{ row_num }}" class="btn btn-primary edit_save_form" value="{{ t('Save') }}">
</td>
<td name="col_name" class="text-nowrap">
<span>{{ row['col_name'] }}</span>
@ -359,7 +359,7 @@
} only %}
</td>
<td class="text-nowrap" name="col_isNull">
<span>{{ row['col_isNull'] ? 'Yes'|trans : 'No'|trans }}</span>
<span>{{ row['col_isNull'] ? t('Yes') : t('No') }}</span>
<input name="field_null[{{ row_num }}]" id="field_{{ row_num }}_6" type="checkbox" value="YES" class="allow_null"
{{- row['col_isNull'] is not empty and row['col_isNull'] != 'NO' and row['col_isNull'] != 'NOT NULL' and row['col_isNull'] != 0 ? ' checked' }}>
</td>
@ -380,11 +380,11 @@
} only %}
<button class="btn btn-link mult_submit change_central_columns" type="submit" name="edit_central_columns"
value="edit central columns" title="{% trans 'Edit' %}">
{{ get_icon('b_edit', 'Edit'|trans) }}
{{ get_icon('b_edit', t('Edit')) }}
</button>
<button class="btn btn-link mult_submit" type="submit" name="delete_central_columns"
value="remove_from_central_columns" title="{% trans 'Delete' %}">
{{ get_icon('b_drop', 'Delete'|trans) }}
{{ get_icon('b_drop', t('Delete')) }}
</button>
</form>
</div>

View File

@ -1,6 +1,6 @@
<form id="createTableMinimalForm" method="post" action="{{ url('/table/create') }}" class="card d-print-none lock-page">
{{ get_hidden_inputs(db) }}
<div class="card-header">{{ get_icon('b_table_add', 'Create new table'|trans, true) }}</div>
<div class="card-header">{{ get_icon('b_table_add', t('Create new table'), true) }}</div>
<div class="card-body row row-cols-lg-auto g-3">
<div class="col-12">
<label for="createTableNameInput" class="form-label">{% trans 'Table name' %}</label>

View File

@ -5,7 +5,7 @@
{% endif %}
<p class="d-print-none">
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', t('Print'), true) }}</button>
</p>
<div>
@ -44,7 +44,7 @@
<td lang="en" dir="ltr"{{ 'set' != column.type and 'enum' != column.type ? ' class="text-nowrap"' }}>
{{ column.print_type }}
</td>
<td>{{ column.is_nullable ? 'Yes'|trans : 'No'|trans }}</td>
<td>{{ column.is_nullable ? t('Yes') : t('No') }}</td>
<td class="text-nowrap">
{% if column.default is null and column.is_nullable %}
<em>NULL</em>
@ -88,7 +88,7 @@
<tr>
<td rowspan="{{ columns_count }}">{{ index.getName() }}</td>
<td rowspan="{{ columns_count }}">{{ index.getType()|default(index.getChoice()) }}</td>
<td rowspan="{{ columns_count }}">{{ index.isUnique() ? 'Yes'|trans : 'No'|trans }}</td>
<td rowspan="{{ columns_count }}">{{ index.isUnique() ? t('Yes') : t('No') }}</td>
<td rowspan="{{ columns_count }}">{{ index.isPacked()|raw }}</td>
{% for column in index.getColumns() %}
@ -121,6 +121,6 @@
</div>
<p class="d-print-none">
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', t('Print'), true) }}</button>
</p>
</div>

View File

@ -90,7 +90,7 @@
type="checkbox"
id="select_{{ t_n_url }}._{{ tab_column[t_n][j].name|url_encode }}"
style="margin: 0;"
title="{{ 'Select "%s"'|trans|format(col_name) }}"
title="{{ t('Select "%s"')|format(col_name) }}"
id_check_all="select_all_{{ i }}"
db_name="{{ db }}"
table_name="{{ table_name }}"
@ -108,7 +108,7 @@
{% if has_query %}
<td class="small_tab_pref small_tab_pref_click_opt"
{# Escaped 2 times to be able to use it in innerHtml #}
option_col_name_modal="<strong>{{ 'Add an option for column "%s".'|trans|format(col_name)|escape('html')|escape('html') }}</strong>"
option_col_name_modal="<strong>{{ t('Add an option for column "%s".')|format(col_name)|escape('html')|escape('html') }}</strong>"
db_name="{{ db }}"
table_name="{{ table_name }}"
col_name="{{ col_name }}"

View File

@ -2,7 +2,7 @@
{{ get_hidden_inputs(db) }}
<input type="hidden" name="operation" value="{{ operation }}">
<label for="selected_page">
{{ operation == 'editPage' ? 'Page to open'|trans : 'Page to delete'|trans }}:
{{ operation == 'editPage' ? t('Page to open') : t('Page to delete') }}:
</label>
{% include 'database/designer/page_selector.twig' with {
'pdfwork': pdfwork,

View File

@ -7,7 +7,7 @@ window.designerConfig = {{ designer_config|raw }};
{% if not has_query %}
<div id="name-panel">
<span id="page_name">
{{ selected_page == null ? 'Untitled'|trans : selected_page }}
{{ selected_page == null ? t('Untitled') : selected_page }}
</span>
<span id="saved_state">
{{ selected_page == null ? '*' : '' }}

View File

@ -50,7 +50,7 @@
<div class="fw-bold text-center w-50">
{{ event.item_type }}
</div>
<input type="submit" name="item_changetype" class="w-50" value="{{ 'Change to %s'|trans|format(event.item_type_toggle) }}">
<input type="submit" name="item_changetype" class="w-50" value="{{ t('Change to %s')|format(event.item_type_toggle) }}">
{% endif %}
</td>
</tr>
@ -89,7 +89,7 @@
<textarea name="item_definition" rows="15" cols="40">
{{- event.item_definition -}}
</textarea><br>
<input type="button" value="{{ 'Format'|trans }}" id="format" class="btn btn-secondary button sqlbutton">
<input type="button" value="{{ t('Format') }}" id="format" class="btn btn-secondary button sqlbutton">
</td>
</tr>
<tr>

View File

@ -1,6 +1,6 @@
<div class="container-fluid my-3">
<h2>
{{ get_icon('b_events', 'Events'|trans) }}
{{ get_icon('b_events', t('Events')) }}
{{ show_mysql_docu('EVENTS') }}
</h2>
@ -15,10 +15,10 @@
</div>
</div>
<button class="btn btn-outline-secondary" id="bulkActionExportButton" type="submit" name="submit_mult" value="export" form="rteListForm" title="{% trans 'Export' %}">
{{ get_icon('b_export', 'Export'|trans) }}
{{ get_icon('b_export', t('Export')) }}
</button>
<button class="btn btn-outline-secondary" id="bulkActionDropButton" type="submit" name="submit_mult" value="drop" form="rteListForm" title="{% trans 'Drop' %}">
{{ get_icon('b_drop', 'Drop'|trans) }}
{{ get_icon('b_drop', t('Drop')) }}
</button>
</div>
</div>
@ -26,7 +26,7 @@
<div{{ items is not empty ? ' class="ms-auto"' }}>
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/events', {'db': db, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
{{ get_icon('b_event_add', 'Create new event'|trans) }}
{{ get_icon('b_event_add', t('Create new event')) }}
</a>
</div>
</div>
@ -35,7 +35,7 @@
{{ get_hidden_inputs(db) }}
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
{{ 'There are no events to display.'|trans|notice }}
{{ t('There are no events to display.')|notice }}
</div>
<table id="eventsTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">
@ -73,10 +73,10 @@
'edit_item': true,
'item_name': event.name
}) }}">
{{ get_icon('b_edit', 'Edit'|trans) }}
{{ get_icon('b_edit', t('Edit')) }}
</a>
{% else %}
{{ get_icon('bd_edit', 'Edit'|trans) }}
{{ get_icon('bd_edit', t('Edit')) }}
{% endif %}
</td>
<td>
@ -85,7 +85,7 @@
'export_item': true,
'item_name': event.name
}) }}">
{{ get_icon('b_export', 'Export'|trans) }}
{{ get_icon('b_export', t('Export')) }}
</a>
</td>
<td>
@ -97,11 +97,11 @@
'sql_query': 'DROP EVENT IF EXISTS %s'|format(backquote(event.name)),
'goto': url('/database/events', {'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 %}
</td>
</tr>

View File

@ -20,10 +20,10 @@
'edit_item': true,
'item_name': event.name
}) }}">
{{ get_icon('b_edit', 'Edit'|trans) }}
{{ get_icon('b_edit', t('Edit')) }}
</a>
{% else %}
{{ get_icon('bd_edit', 'Edit'|trans) }}
{{ get_icon('bd_edit', t('Edit')) }}
{% endif %}
</td>
<td>
@ -33,7 +33,7 @@
'export_item': true,
'item_name': event.name
}) }}">
{{ get_icon('b_export', 'Export'|trans) }}
{{ get_icon('b_export', t('Export')) }}
</a>
</td>
<td>
@ -46,11 +46,11 @@
'sql_query': sql_drop,
'goto': url('/database/events', {'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 %}
</td>
</tr>

View File

@ -4,7 +4,7 @@
{% if export_type == 'raw' %}
{% trans %}Exporting a raw query{% notes %}A query that the user has written freely{% endtrans %}
{% else %}
{{ 'Exporting tables from "%s" database'|trans|format(db) }}
{{ t('Exporting tables from "%s" database')|format(db) }}
{% endif %}
{% endblock %}

View File

@ -1,3 +1,3 @@
{% extends 'import.twig' %}
{% block title %}{{ 'Importing into the database "%s"'|trans|format(db) }}{% endblock %}
{% block title %}{{ t('Importing into the database "%s"')|format(db) }}{% endblock %}

View File

@ -1,5 +1,5 @@
<div class="container my-3">
<h2>{{ 'Database operations'|trans }}</h2>
<h2>{{ t('Database operations') }}</h2>
{{ message|raw }}
@ -7,7 +7,7 @@
<form method="post" action="{{ url('/database/operations') }}" id="formDatabaseComment">
{{ get_hidden_inputs(db) }}
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_comment', 'Database comment'|trans, true) }}</div>
<div class="card-header">{{ get_icon('b_comment', t('Database comment'), true) }}</div>
<div class="card-body">
<div class="row g-3">
<div class="col-auto">
@ -25,7 +25,7 @@
<form id="createTableMinimalForm" method="post" action="{{ url('/table/create') }}" class="card mb-2 lock-page">
{{ get_hidden_inputs(db) }}
<div class="card-header">{{ get_icon('b_table_add', 'Create new table'|trans, true) }}</div>
<div class="card-header">{{ get_icon('b_table_add', t('Create new table'), true) }}</div>
<div class="card-body row row-cols-lg-auto g-3">
<div class="col-md-6">
<label for="createTableNameInput" class="form-label">{% trans 'Table name' %}</label>
@ -52,7 +52,7 @@
{% endif %}
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_edit', 'Rename database to'|trans, true) }}</div>
<div class="card-header">{{ get_icon('b_edit', t('Rename database to'), true) }}</div>
<div class="card-body">
<div class="mb-3 row g-3">
<div class="col-auto">
@ -81,7 +81,7 @@
{% if is_drop_database_allowed %}
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_deltbl', 'Remove database'|trans, true) }}</div>
<div class="card-header">{{ get_icon('b_deltbl', t('Remove database'), true) }}</div>
<div class="card-body">
<div class="card-text">
{{ link_or_button(
@ -92,10 +92,10 @@
'goto': url('/'),
'reload': true,
'purge': true,
'message_to_show': 'Database %s has been dropped.'|trans|format(backquote(db))|e,
'message_to_show': t('Database %s has been dropped.')|format(backquote(db))|e,
'db': null
},
'Drop the database (DROP)'|trans,
t('Drop the database (DROP)'),
{
'id': 'drop_db_anchor',
'class': 'ajax text-danger'
@ -116,7 +116,7 @@
{% endif %}
<div class="card mb-2">
<div class="card-header">{{ get_icon('b_edit', 'Copy database to'|trans, true) }}</div>
<div class="card-header">{{ get_icon('b_edit', t('Copy database to'), true) }}</div>
<div class="card-body">
<div class="mb-3 row g-3">
<div class="col-auto">
@ -153,7 +153,7 @@
<div class="form-check">
<input class="form-check-input" type="checkbox" name="drop_if_exists" value="true" id="checkbox_drop">
<label class="form-check-label" for="checkbox_drop">{{ 'Add %s'|trans|format('DROP TABLE / DROP VIEW') }}</label>
<label class="form-check-label" for="checkbox_drop">{{ t('Add %s')|format('DROP TABLE / DROP VIEW') }}</label>
</div>
<div class="form-check">
@ -192,7 +192,7 @@
{{ get_hidden_inputs(db) }}
<div class="card mb-2">
<div class="card-header">{{ get_icon('s_asci', 'Collation'|trans, true) }}</div>
<div class="card-header">{{ get_icon('s_asci', t('Collation'), true) }}</div>
<div class="card-body">
<div class="mb-3 row g-3">
<div class="col-auto">

View File

@ -2,7 +2,7 @@
{% if is_superuser %}
<h2>
{{ get_icon('b_usrcheck') }}
{{ 'Users having access to "%s"'|trans|format('<a href="' ~ database_url ~ get_common({'db': db}, '&') ~ '">' ~ db|escape('html') ~ '</a>')|raw }}
{{ t('Users having access to "%s"')|format('<a href="' ~ database_url ~ get_common({'db': db}, '&') ~ '">' ~ db|escape('html') ~ '</a>')|raw }}
</h2>
<form id="usersForm" action="{{ url('/server/privileges') }}" class="card mb-3">
@ -66,7 +66,7 @@
</code>
</td>
<td>
{{ priv.has_grant ? 'Yes'|trans : 'No'|trans }}
{{ priv.has_grant ? t('Yes') : t('No') }}
</td>
<td>
{% if is_grantuser %}
@ -77,7 +77,7 @@
'tablename': '',
'routinename': priv.routine ?? ''
}) }}">
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
{{ get_icon('b_usredit', t('Edit privileges')) }}
</a>
{% endif %}
</td>
@ -88,7 +88,7 @@
'export': true,
'initial': ''
}) }}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
{{ get_icon('b_tblexport', t('Export')) }}
</a>
</td>
</tr>
@ -108,18 +108,18 @@
</div>
<div>
{{ 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'}) }}
<input type="checkbox" id="usersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="usersForm_checkall">{% trans 'Check all' %}</label>
<em class="with-selected">{% trans 'With selected:' %}</em>
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="export" title="{% trans 'Export' %}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
{{ get_icon('b_tblexport', t('Export')) }}
</button>
</div>
</div>
</form>
{% else %}
{{ 'Not enough privilege to view users.'|trans|error }}
{{ t('Not enough privilege to view users.')|error }}
{% endif %}
{% if is_createuser %}
@ -128,7 +128,7 @@
'adduser': true,
'dbname': db
}) }}">
{{ get_icon('b_usradd', 'Add user account'|trans) }}
{{ get_icon('b_usradd', t('Add user account')) }}
</a>
</div>
{% endif %}

View File

@ -40,7 +40,7 @@
<div class="fw-bold text-center w-50">
{{ routine['item_type'] }}
</div>
<input type="submit" class="btn btn-secondary" name="routine_changetype" value="{{ 'Change to %s'|trans|format(routine.item_type_toggle) }}">
<input type="submit" class="btn btn-secondary" name="routine_changetype" value="{{ t('Change to %s')|format(routine.item_type_toggle) }}">
{% endif %}
</td>
</tr>
@ -118,7 +118,7 @@
<td class="text-nowrap">{% trans 'Definition' %}</td>
<td>
<textarea name="item_definition" rows="15" cols="40">{{ routine.item_definition }}</textarea><br>
<input type="button" value="{{ 'Format'|trans }}" id="format" class="btn btn-secondary button sqlbutton">
<input type="button" value="{{ t('Format') }}" id="format" class="btn btn-secondary button sqlbutton">
</td>
</tr>
<tr>

View File

@ -4,7 +4,7 @@
{{ get_hidden_inputs(db) }}
<div class="card">
<div class="card-header">{{ ajax ? 'Routine parameters'|trans : routine['item_name'] }}</div>
<div class="card-header">{{ ajax ? t('Routine parameters') : routine['item_name'] }}</div>
<div class="card-body">
<table class="table w-auto rte_table{{ not ajax ? ' caption-top' }}">

View File

@ -1,6 +1,6 @@
<div class="container-fluid my-3">
<h2>
{{ get_icon('b_routines', 'Routines'|trans) }}
{{ get_icon('b_routines', t('Routines')) }}
{{ show_mysql_docu('STORED_ROUTINES') }}
</h2>
@ -15,17 +15,17 @@
</div>
</div>
<button class="btn btn-outline-secondary" id="bulkActionExportButton" type="submit" name="submit_mult" value="export" form="rteListForm" title="{% trans 'Export' %}">
{{ get_icon('b_export', 'Export'|trans) }}
{{ get_icon('b_export', t('Export')) }}
</button>
<button class="btn btn-outline-secondary" id="bulkActionDropButton" type="submit" name="submit_mult" value="drop" form="rteListForm" title="{% trans 'Drop' %}">
{{ get_icon('b_drop', 'Drop'|trans) }}
{{ get_icon('b_drop', t('Drop')) }}
</button>
</div>
</div>
<div class="ms-auto">
<div class="input-group">
<span class="input-group-text">{{ get_image('b_search', 'Search'|trans) }}</span>
<span class="input-group-text">{{ get_image('b_search', t('Search')) }}</span>
<input class="form-control" name="filterText" type="text" id="filterText" value="" placeholder="{% trans 'Search' %}" aria-label="{% trans 'Search' %}">
</div>
</div>
@ -33,7 +33,7 @@
<div{{ has_any_routines ? ' class="ms-2"' }}>
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/routines', {'db': db, 'table': table, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
{{ get_icon('b_routine_add', 'Create new routine'|trans) }}
{{ get_icon('b_routine_add', t('Create new routine')) }}
</a>
</div>
</div>
@ -42,7 +42,7 @@
{{ get_hidden_inputs(db, table) }}
<div id="nothing2display"{{ has_any_routines ? ' class="hide"' }}>
{{ 'There are no routines to display.'|trans|notice }}
{{ t('There are no routines to display.')|notice }}
</div>
<table id="routinesTable" class="table table-striped table-hover{{ not has_any_routines ? ' hide' }} data w-auto">

View File

@ -21,7 +21,7 @@
<input id="item_param_length_{{ index }}" name="item_param_length[{{ index }}]" type="text" value="{{ item_param_length|raw }}">
<div class="enum_hint">
<a href="#" class="open_enum_editor">
{{ get_image('b_edit', '', {'title': 'ENUM/SET editor'|trans}) }}
{{ get_image('b_edit', '', {'title': t('ENUM/SET editor')}) }}
</a>
</div>
</td>
@ -48,7 +48,7 @@
</td>
<td class="routine_param_remove{{ drop_class }}">
<a href="#" class="routine_param_remove_anchor">
{{ get_icon('b_drop', 'Drop'|trans) }}
{{ get_icon('b_drop', t('Drop')) }}
</a>
</td>
</tr>

View File

@ -17,10 +17,10 @@
'item_name': routine.name,
'item_type': routine.type
}) }}">
{{ get_icon('b_edit', 'Edit'|trans) }}
{{ get_icon('b_edit', t('Edit')) }}
</a>
{% else %}
{{ get_icon('bd_edit', 'Edit'|trans) }}
{{ get_icon('bd_edit', t('Edit')) }}
{% endif %}
</td>
<td>
@ -31,7 +31,7 @@
'item_name': routine.name,
'item_type': routine.type
}, '') }}">
{{ get_icon('b_nextpage', 'Execute'|trans) }}
{{ get_icon('b_nextpage', t('Execute')) }}
</a>
{% else %}
<a class="ajax exec_anchor" href="{{ url('/database/routines', {
@ -41,11 +41,11 @@
'item_name': routine.name,
'item_type': routine.type
}) }}">
{{ get_icon('b_nextpage', 'Execute'|trans) }}
{{ get_icon('b_nextpage', t('Execute')) }}
</a>
{% endif %}
{% else %}
{{ get_icon('bd_nextpage', 'Execute'|trans) }}
{{ get_icon('bd_nextpage', t('Execute')) }}
{% endif %}
</td>
<td>
@ -57,10 +57,10 @@
'item_name': routine.name,
'item_type': routine.type
}) }}">
{{ get_icon('b_export', 'Export'|trans) }}
{{ get_icon('b_export', t('Export')) }}
</a>
{% else %}
{{ get_icon('bd_export', 'Export'|trans) }}
{{ get_icon('bd_export', t('Export')) }}
{% endif %}
</td>
<td>
@ -72,7 +72,7 @@
'sql_query': sql_drop,
'goto': url('/database/routines', {'db': db})
},
get_icon('b_drop', 'Drop'|trans),
get_icon('b_drop', t('Drop')),
{'class': 'ajax drop_anchor'}
) }}
</td>

View File

@ -15,11 +15,11 @@
<div class="form-check">
<input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio1" value="1"{{ criteria_search_type == '1' ? ' checked' }}>
<label class="form-check-label" for="criteriaSearchTypeRadio1">{% trans 'at least one of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label>
<label class="form-check-label" for="criteriaSearchTypeRadio1">{% trans 'at least one of the words' %} {{ show_hint(t('Words are separated by a space character (" ").')) }}</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio2" value="2"{{ criteria_search_type == '2' ? ' checked' }}>
<label class="form-check-label" for="criteriaSearchTypeRadio2">{% trans 'all of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label>
<label class="form-check-label" for="criteriaSearchTypeRadio2">{% trans 'all of the words' %} {{ show_hint(t('Words are separated by a space character (" ").')) }}</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio3" value="3"{{ criteria_search_type == '3' ? ' checked' }}>

View File

@ -37,7 +37,7 @@
<th class="value tbl_rows font-monospace text-end">{{ cell_text }}</th>
{% if not (properties_num_columns > 1) %}
<th class="text-center">
<dfn title="{{ '%s is the default storage engine on this MySQL server.'|trans|format(default_storage_engine) }}">
<dfn title="{{ t('%s is the default storage engine on this MySQL server.')|format(default_storage_engine) }}">
{{ default_storage_engine }}
</dfn>
</th>

View File

@ -1,5 +1,5 @@
<div class="clearfloat d-print-none">
{{ 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'}) }}
<input type="checkbox" id="tablesForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="tablesForm_checkall">{% trans 'Check all' %}</label>
{% if overhead_check != '' %}
@ -49,7 +49,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Cancel' %}"></button>
</div>
<div class="modal-body">
{{ 'This action may change some of the columns definition.[br]Are you sure you want to continue?'|trans|sanitize }}
{{ t('This action may change some of the columns definition.[br]Are you sure you want to continue?')|sanitize }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans 'Cancel' %}</button>

View File

@ -1,7 +1,7 @@
<a id="{{ table_name_hash }}_favorite_anchor"
class="ajax favorite_table_anchor"
href="{{ url('/database/structure/favorite-table', fav_params) }}"
title="{{ already_favorite ? 'Remove from Favorites'|trans : 'Add to Favorites'|trans }}"
title="{{ already_favorite ? t('Remove from Favorites') : t('Add to Favorites') }}"
data-favtargets="{{ db_table_name_hash }}">
{{ already_favorite ? get_icon('b_favorite') : get_icon('b_no_favorite') }}
</a>

View File

@ -16,13 +16,13 @@
</div>
<hr>
<p class="d-print-none">
<button type="button" class="btn btn-link p-0 jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
<button type="button" class="btn btn-link p-0 jsPrintButton">{{ get_icon('b_print', t('Print'), true) }}</button>
<a href="{{ url('/database/data-dictionary', {'db': database, 'goto': url('/database/structure')}) }}">
{{ get_icon('b_tblanalyse', 'Data dictionary'|trans, true) }}
{{ get_icon('b_tblanalyse', t('Data dictionary'), true) }}
</a>
</p>
{% else %}
{{ 'No tables found in database.'|trans|notice }}
{{ t('No tables found in database.')|notice }}
{% endif %}
{% if not is_system_schema %}

View File

@ -14,8 +14,8 @@
</th>
{% if server_replica_status %}
<td class="text-center">
{{ ignored ? get_image('s_cancel', 'Not replicated'|trans) }}
{{ do ? get_image('s_success', 'Replicated'|trans) }}
{{ ignored ? get_image('s_cancel', t('Not replicated')) }}
{{ do ? get_image('s_success', t('Replicated')) }}
</td>
{% endif %}
@ -40,30 +40,30 @@
<td class="text-center d-print-none">
<a class="disableAjax" href="{{ url('/sql', table_url_params|merge({'pos': 0})) }}">
{{ may_have_rows ? get_icon('b_browse', 'Browse'|trans) : get_icon('bd_browse', 'Browse'|trans) }}
{{ may_have_rows ? get_icon('b_browse', t('Browse')) : get_icon('bd_browse', t('Browse')) }}
</a>
</td>
<td class="text-center d-print-none">
<a class="disableAjax" href="{{ url('/table/structure', table_url_params) }}">
{{ get_icon('b_props', 'Structure'|trans) }}
{{ get_icon('b_props', t('Structure')) }}
</a>
</td>
<td class="text-center d-print-none">
<a class="disableAjax" href="{{ url('/table/search', table_url_params) }}">
{{ may_have_rows ? get_icon('b_select', 'Search'|trans) : get_icon('bd_select', 'Search'|trans) }}
{{ may_have_rows ? get_icon('b_select', t('Search')) : get_icon('bd_select', t('Search')) }}
</a>
</td>
{% if not db_is_system_schema %}
<td class="text-center d-print-none">
<a class="disableAjax" href="{{ url('/table/change', table_url_params) }}">{{ get_icon('b_insrow', 'Insert'|trans) }}</a>
<a class="disableAjax" href="{{ url('/table/change', table_url_params) }}">{{ get_icon('b_insrow', t('Insert')) }}</a>
</td>
{% if table_is_view %}
<td class="text-center d-print-none">
<a href="{{ url('/view/create', {
'db': db,
'table': current_table['TABLE_NAME']
}) }}">{{ get_icon('b_edit', 'Edit'|trans) }}</a>
}) }}">{{ get_icon('b_edit', t('Edit')) }}</a>
</td>
{% else %}
<td class="text-center d-print-none">
@ -71,7 +71,7 @@
'sql_query': empty_table_sql_query,
'message_to_show': empty_table_message_to_show
}), '') }}">
{{ may_have_rows ? get_icon('b_empty', 'Empty'|trans) : get_icon('bd_empty', 'Empty'|trans) }}
{{ may_have_rows ? get_icon('b_empty', t('Empty')) : get_icon('bd_empty', t('Empty')) }}
</a>
</td>
{% endif %}
@ -84,7 +84,7 @@
'sql_query': drop_query,
'message_to_show': drop_message
}), '') }}">
{{ get_icon('b_drop', 'Drop'|trans) }}
{{ get_icon('b_drop', t('Drop')) }}
</a>
</td>
{% endif %}

View File

@ -5,7 +5,7 @@
<thead>
<tr>
<th class="d-print-none"></th>
<th>{{ sortable_table_header('Table'|trans, 'table') }}</th>
<th>{{ sortable_table_header(t('Table'), 'table') }}</th>
{% if replication %}
<th>{% trans 'Replication' %}</th>
{% endif %}
@ -23,42 +23,42 @@
</th>
{# larger values are more interesting so default sort order is DESC #}
<th>
{{ sortable_table_header('Rows'|trans, 'records', 'DESC') }}
{{ show_hint('May be approximate. Click on the number to get the exact count. See [doc@faq3-11]FAQ 3.11[/doc].'|trans|sanitize) }}
{{ sortable_table_header(t('Rows'), 'records', 'DESC') }}
{{ show_hint(t('May be approximate. Click on the number to get the exact count. See [doc@faq3-11]FAQ 3.11[/doc].')|sanitize) }}
</th>
{% if not (properties_num_columns > 1) %}
<th>{{ sortable_table_header('Type'|trans, 'type') }}</th>
<th>{{ sortable_table_header('Collation'|trans, 'collation') }}</th>
<th>{{ sortable_table_header(t('Type'), 'type') }}</th>
<th>{{ sortable_table_header(t('Collation'), 'collation') }}</th>
{% endif %}
{% if is_show_stats %}
{# larger values are more interesting so default sort order is DESC #}
<th>{{ sortable_table_header('Size'|trans, 'size', 'DESC') }}</th>
<th>{{ sortable_table_header(t('Size'), 'size', 'DESC') }}</th>
{# larger values are more interesting so default sort order is DESC #}
<th>{{ sortable_table_header('Overhead'|trans, 'overhead', 'DESC') }}</th>
<th>{{ sortable_table_header(t('Overhead'), 'overhead', 'DESC') }}</th>
{% endif %}
{% if show_charset %}
<th>{{ sortable_table_header('Charset'|trans, 'charset') }}</th>
<th>{{ sortable_table_header(t('Charset'), 'charset') }}</th>
{% endif %}
{% if show_comment %}
<th>{{ sortable_table_header('Comment'|trans, 'comment') }}</th>
<th>{{ sortable_table_header(t('Comment'), 'comment') }}</th>
{% endif %}
{% if show_creation %}
{# newer values are more interesting so default sort order is DESC #}
<th>{{ sortable_table_header('Creation'|trans, 'creation', 'DESC') }}</th>
<th>{{ sortable_table_header(t('Creation'), 'creation', 'DESC') }}</th>
{% endif %}
{% if show_last_update %}
{# newer values are more interesting so default sort order is DESC #}
<th>{{ sortable_table_header('Last update'|trans, 'last_update', 'DESC') }}</th>
<th>{{ sortable_table_header(t('Last update'), 'last_update', 'DESC') }}</th>
{% endif %}
{% if show_last_check %}
{# newer values are more interesting so default sort order is DESC #}
<th>{{ sortable_table_header('Last check'|trans, 'last_check', 'DESC') }}</th>
<th>{{ sortable_table_header(t('Last check'), 'last_check', 'DESC') }}</th>
{% endif %}
</tr>
</thead>

View File

@ -1,7 +1,7 @@
<a href="{{ url('/table/tracking', {'table': table, 'db': db}) }}">
{% if is_tracked -%}
{{ get_image('eye', 'Tracking is active.'|trans) }}
{{ get_image('eye', t('Tracking is active.')) }}
{%- else -%}
{{ get_image('eye_grey', 'Tracking is not active.'|trans) }}
{{ get_image('eye_grey', t('Tracking is not active.')) }}
{%- endif %}
</a>

View File

@ -90,7 +90,7 @@
'table': version.table_name,
'delete_tracking': true
}, '', false) }}">
{{ get_icon('b_drop', 'Delete tracking'|trans) }}
{{ get_icon('b_drop', t('Delete tracking')) }}
</a>
</td>
<td>
@ -101,7 +101,7 @@
'back': url('/database/tracking'),
'table': version.table_name
}, '', false) }}">
{{ get_icon('b_versions', 'Versions'|trans) }}
{{ get_icon('b_versions', t('Versions')) }}
</a>
<a href="{{ url('/table/tracking') }}" data-post="
{{- get_common({
@ -112,7 +112,7 @@
'report': true,
'version': version.version
}, '', false) }}">
{{ get_icon('b_report', 'Tracking report'|trans) }}
{{ get_icon('b_report', t('Tracking report')) }}
</a>
<a href="{{ url('/table/tracking') }}" data-post="
{{- get_common({
@ -123,7 +123,7 @@
'snapshot': true,
'version': version.version
}, '', false) }}">
{{ get_icon('b_props', 'Structure snapshot'|trans) }}
{{ get_icon('b_props', t('Structure snapshot')) }}
</a>
</td>
</tr>
@ -136,7 +136,7 @@
} only %}
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="delete_tracking"
title="{% trans 'Delete tracking' %}">
{{ get_icon('b_drop', 'Delete tracking'|trans) }}
{{ get_icon('b_drop', t('Delete tracking')) }}
</button>
</form>
</div>
@ -172,7 +172,7 @@
'db': db,
'table': table_name
})) }}">
{{ get_icon('eye', 'Track table'|trans) }}
{{ get_icon('eye', t('Track table')) }}
</a>
</td>
</tr>
@ -184,7 +184,7 @@
'form_name': 'untrackedForm'
} only %}
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="track" title="{% trans 'Track table' %}">
{{ get_icon('eye', 'Track table'|trans) }}
{{ get_icon('eye', t('Track table')) }}
</button>
</form>
{% endif %}

View File

@ -13,9 +13,9 @@
{% if grid_edit_config == 'disabled' %}
{% set grid_edit_tooltip = {} %}
{% elseif grid_edit_config == 'click' %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'right', 'title': 'You can also edit most values by clicking directly on them.'|trans} %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'right', 'title': t('You can also edit most values by clicking directly on them.')} %}
{% else %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'right', 'title': 'You can also edit most values by double-clicking directly on them.'|trans} %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'right', 'title': t('You can also edit most values by double-clicking directly on them.')} %}
{% endif %}
{{ link_or_button(edit.url, edit.params, edit.string, grid_edit_tooltip) }}
{% if where_clause is not empty %}
@ -75,9 +75,9 @@
{% if grid_edit_config == 'disabled' %}
{% set grid_edit_tooltip = {} %}
{% elseif grid_edit_config == 'click' %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'left', 'title': 'You can also edit most values by clicking directly on them.'|trans} %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'left', 'title': t('You can also edit most values by clicking directly on them.')} %}
{% else %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'left', 'title': 'You can also edit most values by double-clicking directly on them.'|trans} %}
{% set grid_edit_tooltip = {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'left', 'title': t('You can also edit most values by double-clicking directly on them.')} %}
{% endif %}
{{ link_or_button(edit.url, edit.params, edit.string, grid_edit_tooltip) }}
{% if where_clause is not empty %}

View File

@ -308,26 +308,26 @@
{% if has_bulk_links is defined and has_bulk_links %}
<div class="d-print-none">
{{ 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'}) }}
<input type="checkbox" id="resultsForm_{{ unique_id }}_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="resultsForm_{{ unique_id }}_checkall">{% trans 'Check all' %}</label>
<em class="with-selected">{% trans 'With selected:' %}</em>
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="edit" title="{% trans 'Edit' %}">
{{ get_icon('b_edit', 'Edit'|trans) }}
{{ get_icon('b_edit', t('Edit')) }}
</button>
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="copy" title="{% trans 'Copy' %}">
{{ get_icon('b_insrow', 'Copy'|trans) }}
{{ get_icon('b_insrow', t('Copy')) }}
</button>
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="delete" title="{% trans 'Delete' %}">
{{ get_icon('b_drop', 'Delete'|trans) }}
{{ get_icon('b_drop', t('Delete')) }}
</button>
{% if has_export_button %}
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="export" title="{% trans 'Export' %}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
{{ get_icon('b_tblexport', t('Export')) }}
</button>
{% endif %}
</div>
@ -345,12 +345,12 @@
<div class="card-body">
{% if operations.has_print_link %}
<button type="button" class="btn btn-link jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
<button type="button" class="btn btn-link jsPrintButton">{{ get_icon('b_print', t('Print'), true) }}</button>
{{ link_or_button(
'#',
null,
get_icon('b_insrow', 'Copy to clipboard'|trans, true),
get_icon('b_insrow', t('Copy to clipboard'), true),
{'id': 'copyToClipBoard', 'class': 'btn'}
) }}
{% endif %}
@ -360,14 +360,14 @@
{{ link_or_button(
url('/table/export'),
operations.url_params,
get_icon('b_tblexport', 'Export'|trans, true),
get_icon('b_tblexport', t('Export'), true),
{'class': 'btn'}
) }}
{{ link_or_button(
url('/table/chart'),
operations.url_params,
get_icon('b_chart', 'Display chart'|trans, true),
get_icon('b_chart', t('Display chart'), true),
{'class': 'btn'}
) }}
@ -375,7 +375,7 @@
{{ link_or_button(
url('/table/gis-visualization'),
operations.url_params,
get_icon('b_globe', 'Visualize GIS data'|trans, true),
get_icon('b_globe', t('Visualize GIS data'), true),
{'class': 'btn'}
) }}
{% endif %}
@ -385,7 +385,7 @@
{{ link_or_button(
url('/view/create'),
{'db': db, 'table': table, 'sql_query': sql_query, 'printview': true},
get_icon('b_view_add', 'Create view'|trans, true),
get_icon('b_view_add', t('Create view'), true),
{'class': 'btn create_view ajax'}
) }}
</span>

View File

@ -1,10 +1,10 @@
<div class="container">
<h2>{{ 'Something went wrong'|trans }}</h2>
<h2>{{ t('Something went wrong') }}</h2>
<div class="card">
<div class="card-body">
{{ error_message|error }}
{% if back_url != '' %}
<a class="card-link" href="{{ back_url }}">{{ 'Go back'|trans }}</a>
<a class="card-link" href="{{ back_url }}">{{ t('Go back') }}</a>
{% endif %}
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="container">
<h2 class="my-3">
{{ get_image('b_export', 'Export'|trans) }}
{{ get_image('b_export', t('Export')) }}
{% block title %}{% endblock %}
</h2>
@ -176,7 +176,7 @@
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" name="quick_export_onserver" value="saveit" id="checkbox_quick_dump_onserver"{{ export_is_checked ? ' checked' }}>
<label class="form-check-label" for="checkbox_quick_dump_onserver">
{{ 'Save on server in the directory <strong>%s</strong>'|trans|format(save_dir|e)|raw }}
{{ t('Save on server in the directory <strong>%s</strong>')|format(save_dir|e)|raw }}
</label>
</div>
<div class="form-check form-switch">
@ -348,7 +348,7 @@
<input class="form-check-input" type="checkbox" role="switch" name="lock_tables" value="something" id="checkbox_lock_tables"
{{- (not repopulate and is_checked_lock_tables) or lock_tables ? ' checked' }}>
<label class="form-check-label" for="checkbox_lock_tables">
{{ 'Use %s statement'|trans|format('<code>LOCK TABLES</code>')|raw }}
{{ t('Use %s statement')|format('<code>LOCK TABLES</code>')|raw }}
</label>
</div>
</li>
@ -371,7 +371,7 @@
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" name="onserver" value="saveit" id="checkbox_dump_onserver"{{ is_checked_export ? ' checked' }}>
<label class="form-check-label" for="checkbox_dump_onserver">
{{ 'Save on server in the directory <strong>%s</strong>'|trans|format(save_dir|e)|raw }}
{{ t('Save on server in the directory <strong>%s</strong>')|format(save_dir|e)|raw }}
</label>
</div>
<div class="form-check form-switch">
@ -389,7 +389,7 @@
<div class="col-auto">
<label for="filename_template" class="col-form-label">
{% trans 'File name template:' %}
{{ show_hint('This value is interpreted using the \'strftime\' function, so you can use time formatting strings. Additionally the following transformations will happen: %s Other text will be kept as is. See the FAQ 6.27 for details.'|trans|format(filename_hint)) }}
{{ show_hint(t('This value is interpreted using the \'strftime\' function, so you can use time formatting strings. Additionally the following transformations will happen: %s Other text will be kept as is. See the FAQ 6.27 for details.')|format(filename_hint)) }}
</label>
</div>
<div class="col-auto">

View File

@ -9,7 +9,7 @@
<div id="selflink" class="d-print-none">
<a href="{{ self_url }}" title="{% trans 'Open new phpMyAdmin window' %}" target="_blank" rel="noopener noreferrer">
{% if show_icons('TabsMode') %}
{{ get_image('window-new', 'Open new phpMyAdmin window'|trans) }}
{{ get_image('window-new', t('Open new phpMyAdmin window')) }}
{% else %}
{% trans 'Open new phpMyAdmin window' %}
{% endif %}
@ -34,7 +34,7 @@
{% set branch_info -%}
<a target="_blank" rel="noopener noreferrer" href="{{ git_revision_info.branchUrl|link }}">{{ git_revision_info.branch }}</a>
{%- endset %}
{{ 'Currently running Git revision %1$s from the %2$s branch.'|trans|format(revision_info, branch_info)|raw }}
{{ t('Currently running Git revision %1$s from the %2$s branch.')|format(revision_info, branch_info)|raw }}
{% else %}
{% trans 'Git information missing!' %}
{% endif %}

View File

@ -1,7 +1,7 @@
<form id="gis_data_editor_form" action="{{ url('/gis-data-editor') }}" method="post">
<div id="gis_data_editor">
<button type="button" class="ui-dialog-titlebar-close btn-close cancel_gis_editor close_gis_editor"></button>
<h3>{{ 'Value for the column "%s"'|trans|format(field) }}</h3>
<h3>{{ t('Value for the column "%s"')|format(field) }}</h3>
<input type="hidden" name="field" value="{{ field }}">
<input type="hidden" name="type" value="{{ column_type }}">
@ -59,8 +59,8 @@
<h3>{% trans 'Output' %}</h3>
<textarea id="gis_data_textarea" class="mb-3" rows="5">{{ result }}</textarea>
<button type="button" class="btn btn-primary gis-copy-data">{{ 'Copy'|trans }}</button>
<button type="button" class="btn btn-secondary cancel_gis_editor"> {{ 'Cancel'|trans }}</button>
<button type="button" class="btn btn-primary gis-copy-data">{{ t('Copy') }}</button>
<button type="button" class="btn btn-secondary cancel_gis_editor"> {{ t('Cancel') }}</button>
</div>
</div>
</form>

View File

@ -33,7 +33,7 @@
{% if is_warnings_enabled %}
<noscript>
{{ 'Javascript must be enabled past this point!'|trans|error }}
{{ t('Javascript must be enabled past this point!')|error }}
</noscript>
{% endif %}
@ -43,7 +43,7 @@
<div class="col-12">
<div id="userAccountDropdown" class="dropdown">
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{- get_image('user', 'Open user account menu'|trans) -}}
{{- get_image('user', t('Open user account menu')) -}}
</button>
<ul class="dropdown-menu">
<li>
@ -54,12 +54,12 @@
<li><hr class="dropdown-divider"></li>
<li>
<a class="dropdown-item disableAjax" href="{{ get_docu_link('index') }}" target="_blank" rel="noopener noreferrer">
{{ get_icon('b_docs', 'phpMyAdmin documentation'|trans) }}
{{ get_icon('b_docs', t('phpMyAdmin documentation')) }}
</a>
</li>
<li>
<a class="dropdown-item disableAjax" href="{{ get_docu_url(is_mariadb) }}" target="_blank" rel="noopener noreferrer">
{{ get_icon('b_sqlhelp', is_mariadb ? 'MariaDB documentation'|trans : 'MySQL documentation'|trans) }}
{{ get_icon('b_sqlhelp', is_mariadb ? t('MariaDB documentation') : t('MySQL documentation')) }}
</a>
</li>
<li><hr class="dropdown-divider"></li>
@ -70,10 +70,10 @@
<input type="hidden" name="set_theme" value="{{ theme_id }}">
<div class="row row-cols-lg-auto align-items-center flex-nowrap">
<div class="col-12">
<label class="col-form-label" for="themeColorModeToggle">{{ get_icon('s_theme', 'Appearance:'|trans) }}</label>
<label class="col-form-label" for="themeColorModeToggle">{{ get_icon('s_theme', t('Appearance:')) }}</label>
</div>
<div class="col-12">
<select class="form-select form-select-sm" name="themeColorMode" id="themeColorModeToggle" aria-label="{{ 'Color mode for the theme'|trans }}">
<select class="form-select form-select-sm" name="themeColorMode" id="themeColorModeToggle" aria-label="{{ t('Color mode for the theme') }}">
{% for color_mode in theme_color_modes %}
<option value="{{ color_mode }}"{{ theme_color_mode == color_mode ? ' selected' }}>
{%- if color_mode == 'light' -%}
@ -92,11 +92,11 @@
</li>
{% endif %}
<li>
<a class="dropdown-item disableAjax" href="{{ url('/preferences/manage') }}">{{ get_icon('s_cog', 'Settings'|trans) }}</a>
<a class="dropdown-item disableAjax" href="{{ url('/preferences/manage') }}">{{ get_icon('s_cog', t('Settings')) }}</a>
</li>
<li><hr class="dropdown-divider"></li>
<li>
<a class="dropdown-item logout disableAjax" href="{{ url('/logout') }}">{{ get_icon('s_loggoff', 'Log out'|trans) }}</a>
<a class="dropdown-item logout disableAjax" href="{{ url('/logout') }}">{{ get_icon('s_loggoff', t('Log out')) }}</a>
</li>
</ul>
</div>
@ -105,9 +105,9 @@
<div class="col-12">
<span id="lock_page_icon"></span>
<span id="page_settings_icon">
{{ get_image('s_cog', 'Page-related settings'|trans) }}
{{ get_image('s_cog', t('Page-related settings')) }}
</span>
<a id="goto_pagetop" href="#">{{ get_image('s_top', 'Click on the bar to scroll to top of page'|trans) }}</a>
<a id="goto_pagetop" href="#">{{ get_image('s_top', t('Click on the bar to scroll to top of page')) }}</a>
</div>
</div>
{% endif %}

View File

@ -12,24 +12,24 @@
{% if branch is same as(false) %}
({% trans 'no branch' %})
{% elseif is_remote_branch %}
{{ 'from %s branch'|trans|format(
{{ t('from %s branch')|format(
'<a href="%s" rel="noopener noreferrer" target="_blank">%s</a>'|format(
'https://github.com/phpmyadmin/phpmyadmin/tree/%s'|format(branch|e)|link,
branch|e
)
)|raw }},<br>
{% else %}
{{ 'from %s branch'|trans|format(branch) }},<br>
{{ t('from %s branch')|format(branch) }},<br>
{% endif %}
{{ 'committed on %s by %s'|trans|format(
{{ t('committed on %s by %s')|format(
committer.date,
'<a href="mailto:%s">%s</a>'|format(committer.email|e, committer.name|e)
)|raw }}
{%- if committer is not same as(author) -%}
,<br>
{{ 'authored on %s by %s'|trans|format(
{{ t('authored on %s by %s')|format(
author.date,
'<a href="mailto:%s">%s</a>'|format(author.email|e, author.name|e)
)|raw }}

View File

@ -43,7 +43,7 @@
{% if has_change_password_link %}
<li id="li_change_password" class="list-group-item">
<a href="{{ url('/user-password') }}" id="change_password_anchor" class="ajax">
{{ get_icon('s_passwd', 'Change password'|trans, true) }}
{{ get_icon('s_passwd', t('Change password'), true) }}
</a>
{{ include('modals/change_password.twig') }}
</li>
@ -81,7 +81,7 @@
<li id="li_user_preferences" class="list-group-item">
<a href="{{ url('/preferences/manage') }}">
{{ get_icon('b_tblops', 'More settings'|trans, true) }}
{{ get_icon('b_tblops', t('More settings'), true) }}
</a>
</li>
{% endif %}
@ -103,7 +103,7 @@
<label for="languageSelect" class="col-form-label text-nowrap">
{{ get_image('s_lang') }}
{% 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 #}
<i lang="en" dir="ltr">(Language)</i>
@ -130,7 +130,7 @@
{{ get_hidden_inputs() }}
<div class="col-12">
<label for="themeSelect" class="col-form-label">
{{ get_icon('s_theme', 'Theme'|trans) }}
{{ get_icon('s_theme', t('Theme')) }}
</label>
</div>
<div class="col-12">
@ -149,7 +149,7 @@
{% for theme in themes %}
{% if theme.is_active and theme.color_modes|length > 1 %}
<div class="col-12">
<select class="form-select autosubmit" name="themeColorMode" aria-label="{{ 'Color mode for the theme'|trans }}">
<select class="form-select autosubmit" name="themeColorMode" aria-label="{{ t('Color mode for the theme') }}">
{% for color_mode in theme.color_modes %}
<option value="{{ color_mode }}"{{ theme.color_mode == color_mode ? ' selected' }}>
{%- if color_mode == 'light' -%}
@ -300,9 +300,9 @@
{% for error in errors %}
<div class="alert {{ error.severity == 'warning' ? 'alert-warning' : 'alert-info' }}" role="alert">
{% if error.severity == 'warning' %}
{{ get_image('s_attention', 'Warning'|trans) }}
{{ get_image('s_attention', t('Warning')) }}
{% else %}
{{ get_image('s_notice', 'Notice'|trans) }}
{{ get_image('s_notice', t('Notice')) }}
{% endif %}
{{ error.message|sanitize }}
</div>

View File

@ -5,7 +5,7 @@
<div class="col">
<div class="card h-100 mt-0">
<div class="card-img-container">
<img src="./themes/{{ theme.id }}/screen.png" class="card-img-top h-100" alt="{{ 'Screenshot of the %s theme.'|trans|format(theme.name) }}">
<img src="./themes/{{ theme.id }}/screen.png" class="card-img-top h-100" alt="{{ t('Screenshot of the %s theme.')|format(theme.name) }}">
</div>
<div class="card-body">
<h5 class="card-title">{{ theme.name }} <small>({{ theme.version }})</small></h5>

View File

@ -1,6 +1,6 @@
<div class="container">
<h2 class="my-3">
{{ get_image('b_import', 'Import'|trans) }}
{{ get_image('b_import', t('Import')) }}
{% block title %}{% endblock %}
</h2>
@ -25,7 +25,7 @@
{# We don't have show anything about compression, when no supported #}
{% if compressions is not empty %}
<p class="card-text">
{{ 'File may be compressed (%s) or uncompressed.'|trans|format(compressions|join(', ')) }}<br>
{{ t('File may be compressed (%s) or uncompressed.')|format(compressions|join(', ')) }}<br>
{% trans 'A compressed file\'s name must end in <strong>.[format].[compression]</strong>. Example: <strong>.sql.zip</strong>' %}
</p>
{% endif %}
@ -53,9 +53,9 @@
<div class="tab-pane fade{{ use_local_file_import ? ' show active' }}" id="localFile" role="tabpanel" aria-labelledby="localFileTab">
{% if local_files is same as(false) %}
{{ 'The directory you set for upload work cannot be reached.'|trans|error }}
{{ t('The directory you set for upload work cannot be reached.')|error }}
{% elseif local_files is not empty %}
<label class="form-label" for="select_local_import_file">{{ 'Select from the web server upload directory [strong]%s[/strong]:'|trans|format(user_upload_dir)|sanitize }}</label>
<label class="form-label" for="select_local_import_file">{{ t('Select from the web server upload directory [strong]%s[/strong]:')|format(user_upload_dir)|sanitize }}</label>
<select class="form-select" size="1" name="local_import_file" id="select_local_import_file">
<option value=""></option>
{{ local_files|raw }}
@ -77,10 +77,10 @@
<p class="card-text">{% trans 'You may also drag and drop a file on any page.' %}</p>
{% elseif upload_dir is not empty %}
{% if local_files is same as(false) %}
{{ 'The directory you set for upload work cannot be reached.'|trans|error }}
{{ t('The directory you set for upload work cannot be reached.')|error }}
{% elseif local_files is not empty %}
<div class="mb-3">
<label class="form-label" for="select_local_import_file">{{ 'Select from the web server upload directory [strong]%s[/strong]:'|trans|format(user_upload_dir)|sanitize }}</label>
<label class="form-label" for="select_local_import_file">{{ t('Select from the web server upload directory [strong]%s[/strong]:')|format(user_upload_dir)|sanitize }}</label>
<select class="form-select" size="1" name="local_import_file" id="select_local_import_file">
<option value=""></option>
{{ local_files|raw }}
@ -92,7 +92,7 @@
</div>
{% endif %}
{% else %}
{{ 'File uploads are not allowed on this server.'|trans|notice }}
{{ t('File uploads are not allowed on this server.')|notice }}
{% endif %}
<label class="form-label" for="charset_of_file">{% trans 'Character set of the file:' %}</label>
@ -123,7 +123,7 @@
{% if timeout_passed is defined and timeout_passed %}
<input type="hidden" name="skip" value="{{ offset }}">
<div class="alert alert-info" role="alert">
{{ 'Previous import timed out, after resubmitting will continue from position %d.'|trans|format(offset) }}
{{ t('Previous import timed out, after resubmitting will continue from position %d.')|format(offset) }}
</div>
{% endif %}

View File

@ -32,24 +32,24 @@
<tr class="noclick">
<td rowspan="{{ columns_count }}" class="edit_index d-print-none ajax">
<a class="ajax" href="{{ url('/table/indexes') }}" data-post="{{ get_common(url_params|merge({'index': index.getName()}), '', false) }}">
{{ get_icon('b_edit', 'Edit'|trans) }}
{{ get_icon('b_edit', t('Edit')) }}
</a>
</td>
<td rowspan="{{ columns_count }}" class="rename_index d-print-none ajax" >
<a class="ajax" href="{{ url('/table/indexes/rename') }}" data-post="{{ get_common(url_params|merge({'index': index.getName()}), '', false) }}">
{{ get_icon('b_rename', 'Rename'|trans) }}
{{ get_icon('b_rename', t('Rename')) }}
</a>
</td>
<td rowspan="{{ columns_count }}" class="d-print-none">
{% if index.getName() == 'PRIMARY' %}
{% set index_params = {
'sql_query': 'ALTER TABLE ' ~ backquote(url_params.table) ~ ' DROP PRIMARY KEY;',
'message_to_show': 'The primary key has been dropped.'|trans
'message_to_show': t('The primary key has been dropped.')
} %}
{% else %}
{% set index_params = {
'sql_query': 'ALTER TABLE ' ~ backquote(url_params.table) ~ ' DROP INDEX ' ~ backquote(index.getName()) ~ ';',
'message_to_show': 'Index %s has been dropped.'|trans|format(index.getName())
'message_to_show': t('Index %s has been dropped.')|format(index.getName())
} %}
{% endif %}
@ -57,13 +57,13 @@
{{ link_or_button(
url('/sql'),
url_params|merge(index_params),
get_icon('b_drop', 'Drop'|trans),
get_icon('b_drop', t('Drop')),
{'class': 'drop_primary_key_index_anchor ajax'}
) }}
</td>
<th rowspan="{{ columns_count }}">{{ index.getName() }}</th>
<td rowspan="{{ columns_count }}">{{ index.getType()|default(index.getChoice()) }}</td>
<td rowspan="{{ columns_count }}">{{ index.isUnique() ? 'Yes'|trans : 'No'|trans }}</td>
<td rowspan="{{ columns_count }}">{{ index.isUnique() ? t('Yes') : t('No') }}</td>
<td rowspan="{{ columns_count }}">{{ index.isPacked()|raw }}</td>
{% for column in index.getColumns() %}
@ -90,7 +90,7 @@
</table>
</div>
{% else %}
<div class="no_indexes_defined">{{ 'No index defined!'|trans|notice }}</div>
<div class="no_indexes_defined">{{ t('No index defined!')|notice }}</div>
{% endif %}
</div>
</div>

View File

@ -21,7 +21,7 @@
<div class="card-header">
<span id="languageSelectLabel">
{% 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 #}
<i lang="en" dir="ltr">(Language)</i>

View File

@ -7,12 +7,12 @@
<a href="{{ 'https://www.phpmyadmin.net/'|link }}" target="_blank" rel="noopener noreferrer" class="logo" tabindex="-1">
<img src="{{ image('logo_right.png', 'pma_logo.png') }}" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0">
</a>
<h1>{{ 'Welcome to %s'|trans|format('<bdo dir="ltr" lang="en">phpMyAdmin</bdo>')|raw }}</h1>
<h1>{{ t('Welcome to %s')|format('<bdo dir="ltr" lang="en">phpMyAdmin</bdo>')|raw }}</h1>
<noscript>
{{ "Javascript must be enabled past this point!"|trans|error }}
{{ t('Javascript must be enabled past this point!')|error }}
</noscript>
<div class="hide" id="js-https-mismatch">
{{ "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 }}
</div>

View File

@ -1,9 +1,9 @@
{% include 'login/twofactor/key-https-warning.twig' %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">{{ 'Deprecated!'|trans }}</h4>
<p>{{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }}</p>
<h4 class="alert-heading">{{ t('Deprecated!') }}</h4>
<p>{{ t('The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).') }}</p>
<p class="mb-0">
{{ 'You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.'|trans }}
{{ t('You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.') }}
</p>
</div>
<p>

View File

@ -1,9 +1,9 @@
{% include 'login/twofactor/key-https-warning.twig' %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">{{ 'Deprecated!'|trans }}</h4>
<p>{{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }}</p>
<h4 class="alert-heading">{{ t('Deprecated!') }}</h4>
<p>{{ t('The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).') }}</p>
<p class="mb-0">
{{ 'You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.'|trans }}
{{ t('You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.') }}
</p>
</div>
<p>

View File

@ -1,3 +1,3 @@
<p class="card-text">{{ 'Please connect your WebAuthn/FIDO2 device. Then confirm registration on the device.'|trans }}</p>
<p class="card-text">{{ t('Please connect your WebAuthn/FIDO2 device. Then confirm registration on the device.') }}</p>
<input type="hidden" id="webauthn_creation_response" name="webauthn_creation_response" value="" data-creation-options="{{ creation_options|e('html_attr') }}">

View File

@ -1,3 +1,3 @@
<p class="card-text">{{ 'Please connect your WebAuthn/FIDO2 device. Then confirm login on the device.'|trans }}</p>
<p class="card-text">{{ t('Please connect your WebAuthn/FIDO2 device. Then confirm login on the device.') }}</p>
<input type="hidden" id="webauthn_request_response" name="webauthn_request_response" value="" data-request-options="{{ request_options|e('html_attr') }}">

View File

@ -16,7 +16,7 @@
'itemType': type,
'itemName': item,
'dbName': database
}, '', false) }}">{{ get_icon('show', 'Unhide'|trans) }}</a>
}, '', false) }}">{{ get_icon('show', t('Unhide')) }}</a>
</td>
</tr>
{% endfor %}

View File

@ -23,29 +23,29 @@
<div id="navipanellinks">
<a href="{{ url('/') }}" class="disableAjax" title="{% trans 'Home' %}">
{{- get_image('b_home', 'Home'|trans) -}}
{{- get_image('b_home', t('Home')) -}}
</a>
{% if server > 0 %}
<a class="logout disableAjax" href="{{ url('/logout') }}" title="{{ auth_type == 'config' ? 'Empty session data'|trans : 'Log out'|trans }}">
{{- get_image('s_loggoff', auth_type == 'config' ? 'Empty session data'|trans : 'Log out'|trans) -}}
<a class="logout disableAjax" href="{{ url('/logout') }}" title="{{ auth_type == 'config' ? t('Empty session data') : t('Log out') }}">
{{- get_image('s_loggoff', auth_type == 'config' ? t('Empty session data') : t('Log out')) -}}
</a>
{% endif %}
<a href="{{ get_docu_link('index') }}" class="disableAjax" title="{% trans 'phpMyAdmin documentation' %}" target="_blank" rel="noopener noreferrer">
{{- get_image('b_docs', 'phpMyAdmin documentation'|trans) -}}
{{- get_image('b_docs', t('phpMyAdmin documentation')) -}}
</a>
<a href="{{ get_docu_url(is_mariadb) }}" class="disableAjax" title="{{ is_mariadb ? 'MariaDB Documentation'|trans : 'MySQL Documentation'|trans }}" target="_blank" rel="noopener noreferrer">
{{- get_image('b_sqlhelp', is_mariadb ? 'MariaDB Documentation'|trans : 'MySQL Documentation'|trans) -}}
<a href="{{ get_docu_url(is_mariadb) }}" class="disableAjax" title="{{ is_mariadb ? t('MariaDB Documentation') : t('MySQL Documentation') }}" target="_blank" rel="noopener noreferrer">
{{- get_image('b_sqlhelp', is_mariadb ? t('MariaDB Documentation') : t('MySQL Documentation')) -}}
</a>
<a id="pma_navigation_settings_icon"{{ not is_navigation_settings_enabled ? ' class="hide"' }} href="#" title="{% trans 'Navigation panel settings' %}">
{{- get_image('s_cog', 'Navigation panel settings'|trans) -}}
{{- get_image('s_cog', t('Navigation panel settings')) -}}
</a>
<a id="pma_navigation_reload" href="#" title="{% trans 'Reload navigation panel' %}">
{{- get_image('s_reload', 'Reload navigation panel'|trans) -}}
{{- get_image('s_reload', t('Reload navigation panel')) -}}
</a>
</div>
@ -55,7 +55,7 @@
</div>
{% 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 %}

View File

@ -2,8 +2,8 @@
<div class="row g-1 my-3 mx-1" id="recentFavoriteTablesWrapper">
{% if recent is not empty %}
<div class="col-auto dropdown">
<button title="{{ 'Recently visited tables'|trans }}" class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{- 'Recent'|trans -}}
<button title="{{ t('Recently visited tables') }}" class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{- t('Recent') -}}
</button>
<ul class="dropdown-menu" id="recentTableList">
{{ recent|raw }}
@ -13,8 +13,8 @@
{% if favorite is not empty %}
<div class="col-auto dropdown">
<button title="{{ 'Favorite tables'|trans }}" class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{- 'Favorites'|trans -}}
<button title="{{ t('Favorite tables') }}" class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{- t('Favorites') -}}
</button>
<ul class="dropdown-menu" id="favoriteTableList">
{{ favorite|raw }}

View File

@ -15,44 +15,44 @@
<li class="nav-item my-1">
<a href="{{ url('/preferences/features') }}" class="nav-link{{ route == '/preferences/features' ? ' active' }} disableAjax">
{{ get_icon('b_tblops', 'Features'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_tblops', t('Features'), false, false, 'TabsMode') }}
</a>
</li>
<li class="nav-item my-1">
<a href="{{ url('/preferences/sql') }}" class="nav-link{{ route == '/preferences/sql' ? ' active' }} disableAjax">
{{ get_icon('b_sql', 'SQL queries'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_sql', t('SQL queries'), false, false, 'TabsMode') }}
</a>
</li>
<li class="nav-item my-1">
<a href="{{ url('/preferences/navigation') }}" class="nav-link{{ route == '/preferences/navigation' ? ' active' }} disableAjax">
{{ get_icon('b_select', 'Navigation panel'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_select', t('Navigation panel'), false, false, 'TabsMode') }}
</a>
</li>
<li class="nav-item my-1">
<a href="{{ url('/preferences/main-panel') }}" class="nav-link{{ route == '/preferences/main-panel' ? ' active' }} disableAjax">
{{ get_icon('b_props', 'Main panel'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_props', t('Main panel'), false, false, 'TabsMode') }}
</a>
</li>
<li class="nav-item my-1">
<a href="{{ url('/preferences/export') }}" class="nav-link{{ route == '/preferences/export' ? ' active' }} disableAjax">
{{ get_icon('b_export', 'Export'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_export', t('Export'), false, false, 'TabsMode') }}
</a>
</li>
<li class="nav-item my-1">
<a href="{{ url('/preferences/import') }}" class="nav-link{{ route == '/preferences/import' ? ' active' }} disableAjax">
{{ get_icon('b_import', 'Import'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_import', t('Import'), false, false, 'TabsMode') }}
</a>
</li>
</ul>
</div>
{% if is_saved %}
{{ 'Configuration has been saved.'|trans|raw_success }}
{{ t('Configuration has been saved.')|raw_success }}
{% endif %}
{% if not has_config_storage %}

View File

@ -1,4 +1,4 @@
{{ 'Configuration contains incorrect data for some fields.'|trans|error }}
{{ t('Configuration contains incorrect data for some fields.')|error }}
<div class="config-form">
{{ form_errors|raw }}
</div>
@ -15,6 +15,6 @@
<p>
{% trans 'Do you want to import remaining settings?' %}
</p>
<input class="btn btn-secondary" type="submit" name="submit_import" value="{{ 'Yes'|trans }}">
<input class="btn btn-secondary" type="submit" name="submit_ignore" value="{{ 'No'|trans }}">
<input class="btn btn-secondary" type="submit" name="submit_import" value="{{ t('Yes') }}">
<input class="btn btn-secondary" type="submit" name="submit_ignore" value="{{ t('No') }}">
</form>

View File

@ -1,6 +1,6 @@
{{ error|raw }}
<script>
{{ get_js_value("window.Messages.strSavedOn", 'Saved on: @DATE@'|trans) }}
{{ get_js_value("window.Messages.strSavedOn", t('Saved on: @DATE@')) }}
</script>
<div class="row">
<div id="maincontainer" class="container-fluid">
@ -32,17 +32,17 @@
{% trans 'Saved on: @DATE@' %}
</div>
<div class="localStorage-empty">
{{ 'You have no saved settings!'|trans|notice }}
{{ t('You have no saved settings!')|notice }}
</div>
</div>
<div class="localStorage-unsupported">
{{ 'This feature is not supported by your web browser'|trans|notice }}
{{ t('This feature is not supported by your web browser')|notice }}
</div>
</div>
<input type="checkbox" id="import_merge" name="import_merge">
<label for="import_merge"> {% trans 'Merge with current configuration' %} </label>
<br><br>
<input class="btn btn-primary" type="submit" name="submit_import" value="{{ 'Go'|trans }}">
<input class="btn btn-primary" type="submit" name="submit_import" value="{{ t('Go') }}">
</form>
</div>
</div>
@ -55,7 +55,7 @@
{% trans 'More settings' %}
</div>
<div class="card-body">
{{ 'You can set more settings by modifying config.inc.php, eg. by using %sSetup script%s.'|trans|format('<a href="setup/index.php" target="_blank">', '</a>')|raw }}
{{ t('You can set more settings by modifying config.inc.php, eg. by using %sSetup script%s.')|format('<a href="setup/index.php" target="_blank">', '</a>')|raw }}
{{ show_docu('setup', 'setup-script') }}
</div>
</div>
@ -68,7 +68,7 @@
</div>
<div class="card-body">
<div class="click-hide-message hide">
{{ 'Configuration has been saved.'|trans|raw_success }}
{{ t('Configuration has been saved.')|raw_success }}
</div>
<form class="prefs-form disableAjax" name="prefs_export"
action="{{ url('/preferences/manage') }}" method="post">
@ -100,7 +100,7 @@
</div>
</span>
<div class="localStorage-unsupported">
{{ 'This feature is not supported by your web browser'|trans|notice }}
{{ t('This feature is not supported by your web browser')|notice }}
</div>
</div>
<br>

View File

@ -6,7 +6,7 @@
</div>
<div class="card-body">
<form method="post" action="{{ url('/preferences/two-factor') }}">
{{ "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 }}
<input type="hidden" name="2fa_remove" value="1">

View File

@ -23,8 +23,8 @@
{% endif %}
{% if missing|length > 0 %}
<p>
{{ '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:') }}
</p>
<ul>
{% for item in missing %}
@ -53,10 +53,10 @@
<p>{{ backend_description }}</p>
{% if backend_id == 'key' %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">{{ 'Deprecated!'|trans }}</h4>
<p>{{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }}</p>
<h4 class="alert-heading">{{ t('Deprecated!') }}</h4>
<p>{{ t('The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).') }}</p>
<p class="mb-0">
{{ 'You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.'|trans }}
{{ t('You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.') }}
</p>
</div>
{% endif %}
@ -87,7 +87,7 @@
<p>
{%- if backend['id'] == 'key' -%}
<span class="text-danger">
{{ '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).') }}
</span>
<br>
{%- endif -%}

View File

@ -1,6 +1,6 @@
{% if tables is empty %}
<li>
<span class="dropdown-item-text">{{ 'There are no favorite tables.'|trans }}</span>
<span class="dropdown-item-text">{{ t('There are no favorite tables.') }}</span>
</li>
{% else %}
{% for table in tables %}

View File

@ -1,6 +1,6 @@
{% if tables is empty %}
<li>
<span class="dropdown-item-text">{{ 'There are no recent tables.'|trans }}</span>
<span class="dropdown-item-text">{{ t('There are no recent tables.') }}</span>
</li>
{% else %}
{% for table in tables %}

View File

@ -520,7 +520,7 @@
<ul>
<li>
{{ 'Create the needed tables with the <code>%screate_tables.sql</code>.'|trans|format(sql_dir|e)|raw }}
{{ t('Create the needed tables with the <code>%screate_tables.sql</code>.')|format(sql_dir|e)|raw }}
{{ show_docu('setup', 'linked-tables') }}
</li>
<li>

View File

@ -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'}) }}
<input type="checkbox" id="{{ form_name }}_checkall" class="checkall_box"
title="{% trans 'Check all' %}">
<label for="{{ form_name }}_checkall">{% trans 'Check all' %}</label>

View File

@ -1,12 +1,12 @@
<div class="container-fluid my-3">
<h2>
{{ get_icon('s_db', has_statistics ? 'Databases statistics'|trans : 'Databases'|trans) }}
{{ get_icon('s_db', has_statistics ? t('Databases statistics') : t('Databases')) }}
</h2>
{% if is_create_database_shown %}
<div class="card">
<div class="card-header">
{{ get_icon('b_newdb', 'Create database'|trans) }}
{{ get_icon('b_newdb', t('Create database')) }}
{{ show_mysql_docu('CREATE_DATABASE') }}
</div>
<div class="card-body">
@ -47,7 +47,7 @@
</div>
</form>
{% else %}
<span class="text-danger">{{ get_icon('s_error', 'No privileges to create databases'|trans) }}</span>
<span class="text-danger">{{ get_icon('s_error', t('No privileges to create databases')) }}</span>
{% endif %}
</div>
</div>
@ -65,7 +65,7 @@
</div>
</div>
<button class="btn btn-outline-secondary" id="bulkActionDropButton" type="submit" name="submit_mult" value="Drop" form="dbStatsForm" title="{% trans 'Drop' %}">
{{ get_icon('db_drop', 'Drop'|trans) }}
{{ get_icon('db_drop', t('Drop')) }}
</button>
</div>
</div>
@ -73,7 +73,7 @@
<div class="ms-auto">
<div class="input-group">
<span class="input-group-text">{{ get_image('b_search', 'Search'|trans) }}</span>
<span class="input-group-text">{{ get_image('b_search', t('Search')) }}</span>
<input class="form-control" name="filterText" type="text" id="filterText" value="" placeholder="{% trans 'Search' %}" aria-label="{% trans 'Search' %}">
</div>
</div>
@ -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 %}
</a>
@ -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 %}
</a>
@ -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 %}
</a>
@ -178,7 +178,7 @@
<td class="name">
<a class="disableAjax" href="{{ database.url }}" title="
{{- "Jump to database '%s'"|trans|format(database.name) }}">
{{- t("Jump to database '%s'")|format(database.name) }}">
{{ database.name }}
</a>
</td>
@ -212,11 +212,11 @@
{% if database.replication.primary.status %}
{% if database.replication.primary.is_replicated %}
<td class="tool text-center">
{{ get_icon('s_success', 'Replicated'|trans) }}
{{ get_icon('s_success', t('Replicated')) }}
</td>
{% else %}
<td class="tool text-center">
{{ get_icon('s_cancel', 'Not replicated'|trans) }}
{{ get_icon('s_cancel', t('Not replicated')) }}
</td>
{% endif %}
{% endif %}
@ -224,19 +224,19 @@
{% if database.replication.replica.status %}
{% if database.replication.replica.is_replicated %}
<td class="tool text-center">
{{ get_icon('s_success', 'Replicated'|trans) }}
{{ get_icon('s_success', t('Replicated')) }}
</td>
{% else %}
<td class="tool text-center">
{{ get_icon('s_cancel', 'Not replicated'|trans) }}
{{ get_icon('s_cancel', t('Not replicated')) }}
</td>
{% endif %}
{% endif %}
<td class="tool">
<a class="disableAjax" href="{{ url('/database/privileges', {'db': database.name}) }}" title="
{{- 'Check privileges for database "%s".'|trans|format(database.name) }}">
{{ get_icon('s_rights', 'Check privileges'|trans) }}
{{- t('Check privileges for database "%s".')|format(database.name) }}">
{{ get_icon('s_rights', t('Check privileges')) }}
</a>
</td>
</tr>
@ -291,7 +291,7 @@
<div class="card">
<div class="card-body">
<div class="alert alert-info" role="alert">
{{ get_icon('s_notice', 'Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'|trans) }}
{{ get_icon('s_notice', t('Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.')) }}
</div>
<a class="card-link" href="{{ url('/server/databases') }}" data-post="{{ get_common({'statistics': '1'}, '', false) }}" title="{% trans 'Enable statistics' %}">
{% trans 'Enable statistics' %}
@ -301,7 +301,7 @@
{% endif %}
{% else %}
<div class="alert alert-primary my-3" role="alert">
{{ get_icon('s_notice', 'No databases'|trans) }}
{{ get_icon('s_notice', t('No databases')) }}
</div>
{% endif %}
</div>

View File

@ -42,5 +42,5 @@
{{ engine.variables|raw }}
{% endif %}
{% else %}
<p>{{ 'Unknown storage engine.'|trans|error }}</p>
<p>{{ t('Unknown storage engine.')|error }}</p>
{% endif %}

View File

@ -22,7 +22,7 @@
{% if database is not empty %}
<input type="checkbox" name="createdb-3" id="createdb-3" checked>
<label for="createdb-3">{{ 'Grant all privileges on database %s.'|trans|format(database) }}</label>
<label for="createdb-3">{{ t('Grant all privileges on database %s.')|format(database) }}</label>
<input type="hidden" name="dbname" value="{{ database }}">
<br>
{% endif %}

View File

@ -2,7 +2,7 @@
<div class="card-header">{% trans %}New{% context %}Create new user{% endtrans %}</div>
<div class="card-body" id="fieldset_add_user">
<a id="add_user_anchor" href="{{ url('/server/privileges', url_params) }}">
{{- get_icon('b_usradd', 'Add user account'|trans) -}}
{{- get_icon('b_usradd', t('Add user account')) -}}
</a>
</div>
</div>

View File

@ -31,7 +31,7 @@
</h2>
{% 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 %}
<form class="submenu-item" name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post">

View File

@ -5,7 +5,7 @@
<li class="page-item{{ selected_initial is same as(initial) ? ' active' }}"{{ selected_initial is same as(initial) ? ' aria-current="page"' }}>
<a class="page-link" href="{{ url('/server/privileges', {'initial': initial}) }}">
{% if initial is same as('') %}
<span class="text-danger text-nowrap">{{ 'Any'|trans }}</span>
<span class="text-danger text-nowrap">{{ t('Any') }}</span>
{% else %}
{{ initial }}
{% endif %}

View File

@ -14,7 +14,7 @@
{{- pred_username is null or pred_username == 'userdefined' ? ' required' }}>
<div id="user_exists_warning" class="hide">
{{ 'An account already exists with the same username but possibly a different hostname.'|trans|notice }}
{{ t('An account already exists with the same username but possibly a different hostname.')|notice }}
</div>
</div>
@ -37,7 +37,7 @@
<input type="text" name="hostname" id="pma_hostname" maxlength="{{ hostname_length }}" value="{{ hostname|default('%') }}" title="
{%- trans 'Host name' %}"{{ pred_hostname == 'userdefined' ? ' required' }}>
{{ show_hint('When Host table is used, this field is ignored and values stored in Host table are used instead.'|trans) }}
{{ show_hint(t('When Host table is used, this field is ignored and values stored in Host table are used instead.')) }}
</div>
<div class="item">

View File

@ -31,7 +31,7 @@
<td class="usrGroup"></td>
{% endif %}
<td>
{{ user.has_grant ? 'Yes'|trans : 'No'|trans }}
{{ user.has_grant ? t('Yes') : t('No') }}
</td>
{% if is_grantuser %}
<td>
@ -42,14 +42,14 @@
'tablename': '',
'routinename': ''
}) }}">
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
{{ get_icon('b_usredit', t('Edit privileges')) }}
</a>
</td>
{% endif %}
{% if user.has_group_edit %}
<td>
<button type="button" class="btn btn-link p-0" data-bs-toggle="modal" data-bs-target="#editUserGroupModal" data-username="{{ user.name }}">
{{ get_icon('b_usrlist', 'Edit user group'|trans) }}
{{ get_icon('b_usrlist', t('Edit user group')) }}
</button>
</td>
{% endif %}
@ -60,7 +60,7 @@
'export': true,
'initial': initial
}) }}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
{{ get_icon('b_tblexport', t('Export')) }}
</a>
</td>
</tr>

View File

@ -35,12 +35,12 @@
<tr>
<td>{{ privilege['name'] }}</td>
<td><code>{{ privilege['privileges']|raw }}</code></td>
<td>{{ privilege['grant'] ? 'Yes'|trans : 'No'|trans }}</td>
<td>{{ privilege['grant'] ? t('Yes') : t('No') }}</td>
{% if type == 'database' %}
<td>{{ privilege['table_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
<td>{{ privilege['table_privs'] ? t('Yes') : t('No') }}</td>
{% elseif type == 'table' %}
<td>{{ privilege['column_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
<td>{{ privilege['column_privs'] ? t('Yes') : t('No') }}</td>
{% endif %}
<td>{{ privilege['edit_link']|raw }}</td>
@ -65,7 +65,7 @@
{% endif -%}
<input type="text" id="text_dbname" name="dbname">
{{ show_hint("Wildcards % and _ should be escaped with a \\ to use them literally."|trans) }}
{{ show_hint(t("Wildcards % and _ should be escaped with a \\ to use them literally.")) }}
{% elseif type == 'table' %}
<input type="hidden" name="dbname" value="{{ escaped_database }}">

View File

@ -678,7 +678,7 @@
<label for="checkbox_References_priv">
<code>
{# l10n: The "REFERENCES" privilege when granting privileges #}
<dfn title="{{ supports_references_privilege ? 'Allows creating foreign key relations.'|trans : (is_mariadb ? 'Not used on MariaDB.'|trans : 'Not used for this MySQL version.'|trans) }}">
<dfn title="{{ supports_references_privilege ? t('Allows creating foreign key relations.') : (is_mariadb ? t('Not used on MariaDB.') : t('Not used for this MySQL version.')) }}">
REFERENCES
</dfn>
</code>

View File

@ -20,7 +20,7 @@
<div class="card-header">{% trans %}New{% context %}Create new user{% endtrans %}</div>
<div class="card-body" id="fieldset_add_user">
<a id="add_user_anchor" href="{{ url('/server/privileges', {'adduser': true}) }}">
{{- get_icon('b_usradd', 'Add user account'|trans) -}}
{{- get_icon('b_usradd', t('Add user account')) -}}
</a>
</div>
</div>

View File

@ -50,11 +50,11 @@
</h2>
{% 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 %}
{% if user_does_not_exists %}
{{ 'The selected user was not found in the privilege table.'|trans|error }}
{{ t('The selected user was not found in the privilege table.')|error }}
{% endif %}
<form class="submenu-item" name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post">

View File

@ -54,7 +54,7 @@
{% else %}
<span class="text-danger">{% trans 'No' %}</span>
{% endif %}
{{ not host.has_select_priv ? show_hint('The selected user was not found in the privilege table.'|trans) }}
{{ not host.has_select_priv ? show_hint(t('The selected user was not found in the privilege table.')) }}
</td>
<td>
<code>{{ host.privileges|join(', ')|raw }}</code>
@ -62,7 +62,7 @@
{% if menus_work %}
<td class="usrGroup">{{ host.group }}</td>
{% endif %}
<td>{{ host.has_grant ? 'Yes'|trans : 'No'|trans }}</td>
<td>{{ host.has_grant ? t('Yes') : t('No') }}</td>
{% if is_grantuser %}
<td class="text-center">
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
@ -72,7 +72,7 @@
'tablename': '',
'routinename': '',
}) }}">
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
{{ get_icon('b_usredit', t('Edit privileges')) }}
</a>
</td>
{% endif %}
@ -80,7 +80,7 @@
<td class="text-center">
{% if host.user is not empty %}
<button type="button" class="btn btn-link p-0" data-bs-toggle="modal" data-bs-target="#editUserGroupModal" data-username="{{ host.user }}">
{{ get_icon('b_usrlist', 'Edit user group'|trans) }}
{{ get_icon('b_usrlist', t('Edit user group')) }}
</button>
{% endif %}
</td>
@ -92,12 +92,12 @@
'initial': initial,
'export': true,
}) }}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
{{ get_icon('b_tblexport', t('Export')) }}
</a>
</td>
{% if has_account_locking %}
<td>
<button type="button" class="btn btn-link p-0 jsAccountLocking" title="{{ host.is_account_locked ? 'Unlock this account.'|trans : 'Lock this account.'|trans }}" data-is-locked="{{ host.is_account_locked ? 'true' : 'false' }}" data-user-name="{{ host.user }}" data-host-name="{{ host.host }}">
<button type="button" class="btn btn-link p-0 jsAccountLocking" title="{{ host.is_account_locked ? t('Unlock this account.') : t('Lock this account.') }}" data-is-locked="{{ host.is_account_locked ? 'true' : 'false' }}" data-user-name="{{ host.user }}" data-host-name="{{ host.host }}">
{% if host.is_account_locked %}
{% set unlock_text %}{% trans %}Unlock{% context %}Unlock the account.{% endtrans %}{% endset %}
{{ get_icon('s_unlock', unlock_text|e) }}
@ -116,13 +116,13 @@
<div class="float-start row">
<div class="col-12">
{{ 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'}) }}
<input type="checkbox" id="usersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="usersForm_checkall">{% trans 'Check all' %}</label>
<em class="with-selected">{% trans 'With selected:' %}</em>
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="export" title="{% trans 'Export' %}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
{{ get_icon('b_tblexport', t('Export')) }}
</button>
<input type="hidden" name="initial" value="{{ initial }}">
@ -136,14 +136,14 @@
<div class="card-header">{% trans %}New{% context %}Create new user{% endtrans %}</div>
<div class="card-body">
<a id="add_user_anchor" href="{{ url('/server/privileges', {'adduser': true}) }}">
{{ get_icon('b_usradd', 'Add user account'|trans) }}
{{ get_icon('b_usradd', t('Add user account')) }}
</a>
</div>
</div>
{% endif %}
<div id="deleteUserCard" class="card mb-3">
<div class="card-header">{{ get_icon('b_usrdrop', 'Remove selected user accounts'|trans) }}</div>
<div class="card-header">{{ get_icon('b_usrdrop', t('Remove selected user accounts')) }}</div>
<div class="card-body">
<p class="card-text">{% trans 'Revoke all active privileges from the users and delete them afterwards.' %}</p>
<div class="form-check">

View File

@ -40,5 +40,5 @@
</div>
</div>
{% else %}
{{ 'No privileges'|trans|error }}
{{ t('No privileges')|error }}
{% endif %}

View File

@ -41,7 +41,7 @@
</select>
</span>
<input type="text" name="hostname" id="pma_hostname" maxlength="{{ hostname_length }}" title="{% trans 'Host' %}" value="{{ hostname }}">
{{ show_hint('When Host table is used, this field is ignored and values stored in Host table are used instead.'|trans) }}
{{ show_hint(t('When Host table is used, this field is ignored and values stored in Host table are used instead.')) }}
</div>
<div class="item">

View File

@ -35,7 +35,7 @@
</tbody>
</table>
<br>
{{ 'Only replicas started with the --report-host=host_name option are visible in this list.'|trans|notice }}
{{ t('Only replicas started with the --report-host=host_name option are visible in this list.')|notice }}
<br>
</div>
</li>

View File

@ -22,10 +22,10 @@
{% if server_replica_status %}
<div id="replica_configuration_gui">
{% if not replica_sql_running %}
{{ 'Replica SQL Thread not running!'|trans|error }}
{{ t('Replica SQL Thread not running!')|error }}
{% endif %}
{% if not replica_io_running %}
{{ 'Replica IO Thread not running!'|trans|error }}
{{ t('Replica IO Thread not running!')|error }}
{% endif %}
<p>{% trans 'Server is configured as replica in a replication process. Would you like to:' %}</p>
@ -74,7 +74,7 @@
{% trans 'Error management:' %}
</a>
<div id="replica_errormanagement_gui" class="hide">
{{ 'Skipping errors might lead into unsynchronized primary and replica!'|trans|error }}
{{ t('Skipping errors might lead into unsynchronized primary and replica!')|error }}
<ul>
<li>
<a href="{{ url('/server/replication') }}" data-post="{{ replica_skip_error_link|raw }}">
@ -84,7 +84,7 @@
<li>
<form method="post" action="{{ url('/server/replication') }}">
{{ get_hidden_inputs('', '') }}
{{ 'Skip next %s errors.'|trans|format('<input type="text" name="sr_skip_errors_count" value="1" class="repl_gui_skip_err_cnt">')|raw }}
{{ t('Skip next %s errors.')|format('<input type="text" name="sr_skip_errors_count" value="1" class="repl_gui_skip_err_cnt">')|raw }}
<input class="btn btn-primary" type="submit" name="sr_replica_skip_error" value="{% trans 'Go' %}">
<input type="hidden" name="sr_take_action" value="1">
</form>

View File

@ -6,10 +6,10 @@
<h2>{% trans 'Advisor system' %}</h2>
{% if data is empty %}
{{ 'Not enough privilege to view the advisor.'|trans|error }}
{{ t('Not enough privilege to view the advisor.')|error }}
{% else %}
<button type="button" class="btn btn-secondary mb-4" data-bs-toggle="modal" data-bs-target="#advisorInstructionsModal">
{{ get_icon('b_help', 'Instructions'|trans) }}
{{ get_icon('b_help', t('Instructions')) }}
</button>
<div class="modal fade" id="advisorInstructionsModal" tabindex="-1" role="dialog" aria-labelledby="advisorInstructionsModalLabel" aria-hidden="true">

View File

@ -1,41 +1,33 @@
{% extends 'server/status/base.twig' %}
{% set active = 'monitor' %}
{% block content %}
<h2 class="mb-3">{{ 'System monitor'|trans }}</h2>
<h2 class="mb-3">{{ t('System monitor') }}</h2>
<div class="mb-3 d-print-none">
<button type="button" class="btn btn-primary" id="monitorPauseResumeButton">{{ get_icon('play', 'Start monitor'|trans) }}</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="collapse" data-bs-target="#monitorSettingsContent" aria-expanded="false" aria-controls="monitorSettingsContent">{{ get_icon('s_cog', 'Settings'|trans) }}</button>
<button type="button" class="btn btn-secondary" id="monitorInstructionsButton">{{ get_icon('b_help', 'Instructions/Setup'|trans) }}</button>
<button type="button" class="btn btn-primary" id="monitorPauseResumeButton">{{ get_icon('play', t('Start monitor')) }}</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="collapse" data-bs-target="#monitorSettingsContent" aria-expanded="false" aria-controls="monitorSettingsContent">{{ get_icon('s_cog', t('Settings')) }}</button>
<button type="button" class="btn btn-secondary" id="monitorInstructionsButton">{{ get_icon('b_help', t('Instructions/Setup')) }}</button>
</div>
<div class="collapse" id="monitorSettingsContent">
<div class="card mb-3 d-print-none">
<div class="card-body">
<div class="mb-3">
<button type="button" class="btn btn-secondary" id="monitorAddNewChartButton">{{ get_icon('b_chart', 'Add chart'|trans) }}</button>
<button type="button" class="btn btn-secondary" id="monitorRearrangeChartButton">{{ get_icon('b_tblops', 'Enable charts dragging'|trans) }}</button>
<button type="button" class="btn btn-primary d-none" id="monitorDoneRearrangeChartButton">{{ get_icon('s_okay', 'Done dragging (rearranging) charts'|trans) }}</button>
<button type="button" class="btn btn-secondary" id="monitorAddNewChartButton">{{ get_icon('b_chart', t('Add chart')) }}</button>
<button type="button" class="btn btn-secondary" id="monitorRearrangeChartButton">{{ get_icon('b_tblops', t('Enable charts dragging')) }}</button>
<button type="button" class="btn btn-primary d-none" id="monitorDoneRearrangeChartButton">{{ get_icon('s_okay', t('Done dragging (rearranging) charts')) }}</button>
</div>
<div class="row mb-3">
<div class="col-auto">
<label class="form-label" for="monitorChartRefreshRateSelect">{{ 'Refresh rate'|trans }}</label>
<label class="form-label" for="monitorChartRefreshRateSelect">{{ t('Refresh rate') }}</label>
<select class="form-select" id="monitorChartRefreshRateSelect" name="monitorChartRefreshRate">
{% for rate in [2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200] %}
<option value="{{ rate }}"{{ rate == 5 ? ' selected' }}>
{%- if rate < 60 -%}
{% if rate == 1 %}
{{- '%d second'|trans|format(rate) -}}
{% else %}
{{- '%d seconds'|trans|format(rate) -}}
{% endif %}
{{- t('%d second', '%d seconds', rate)|format(rate) -}}
{%- else -%}
{% if rate / 60 == 1 %}
{{- '%d minute'|trans|format(rate / 60) -}}
{% else %}
{{- '%d minutes'|trans|format(rate / 60) -}}
{% endif %}
{{- t('%d minute', '%d minutes', rate / 60)|format(rate / 60) -}}
{%- endif -%}
</option>
{% endfor %}
@ -43,7 +35,7 @@
</div>
<div class="col-auto">
<label class="form-label" for="monitorChartColumnsSelect">{{ 'Chart columns'|trans }}</label>
<label class="form-label" for="monitorChartColumnsSelect">{{ t('Chart columns') }}</label>
<select class="form-select" id="monitorChartColumnsSelect" name="monitorChartColumns">
{% for number_of_columns in 1..6 %}
<option>{{ number_of_columns }}</option>
@ -55,12 +47,12 @@
<div>
<p class="card-text">
<strong>{% trans 'Chart arrangement' %}</strong><br>
<span class="text-body-secondary">{{ 'The arrangement of the charts is stored to the browsers local storage. You may want to export it if you have a complicated set up.'|trans }}</span>
<span class="text-body-secondary">{{ t('The arrangement of the charts is stored to the browsers local storage. You may want to export it if you have a complicated set up.') }}</span>
</p>
<div>
<button type="button" class="btn btn-secondary" id="monitorImportConfigButton">{{ 'Import'|trans }}</button>
<button type="button" class="btn btn-secondary" id="monitorExportConfigButton">{{ 'Export'|trans }}</button>
<button type="button" class="btn btn-secondary" id="monitorResetConfigButton">{{ 'Reset to default'|trans }}</button>
<button type="button" class="btn btn-secondary" id="monitorImportConfigButton">{{ t('Import') }}</button>
<button type="button" class="btn btn-secondary" id="monitorExportConfigButton">{{ t('Export') }}</button>
<button type="button" class="btn btn-secondary" id="monitorResetConfigButton">{{ t('Reset to default') }}</button>
</div>
</div>
</div>

View File

@ -25,7 +25,7 @@
{{ server_process_list|raw }}
<div class="row">
{{ 'Note: Enabling the auto refresh here might cause heavy traffic between the web server and the MySQL server.'|trans|notice }}
{{ t('Note: Enabling the auto refresh here might cause heavy traffic between the web server and the MySQL server.')|notice }}
</div>
<div class="tabLinks row">
@ -36,17 +36,9 @@
{% for rate in [2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200] %}
<option value="{{ rate }}"{{ rate == 5 ? ' selected' }}>
{% if rate < 60 %}
{% if rate == 1 %}
{{ '%d second'|trans|format(rate) }}
{% else %}
{{ '%d seconds'|trans|format(rate) }}
{% endif %}
{{- t('%d second', '%d seconds', rate)|format(rate) -}}
{% else %}
{% if rate / 60 == 1 %}
{{ '%d minute'|trans|format(rate / 60) }}
{% else %}
{{ '%d minutes'|trans|format(rate / 60) }}
{% endif %}
{{- t('%d minute', '%d minutes', rate / 60)|format(rate / 60) -}}
{% endif %}
</option>
{% endfor %}

View File

@ -19,13 +19,13 @@
{% if column.is_full %}
{{ get_image(
's_partialtext',
'Truncate shown queries'|trans,
t('Truncate shown queries'),
{'class': 'icon_fulltext'}
) }}
{% else %}
{{ get_image(
's_fulltext',
'Show full queries'|trans,
t('Show full queries'),
{'class': 'icon_fulltext'}
) }}
{% endif %}

View File

@ -3,7 +3,7 @@
{% block content %}
<div class="container">
{% if not is_data_loaded %}
{{ 'Not enough privilege to view query statistics.'|trans|error }}
{{ t('Not enough privilege to view query statistics.')|error }}
{% else %}
<h3>
{% trans %}Questions since startup:{% notes %}Questions is the name of a MySQL Status variable{% endtrans %} {{ format_number(stats.total, 0) }}
@ -49,7 +49,7 @@
</table>
<div class="col">
<canvas id="query-statistics-chart" data-chart-data="{{ chart_data|json_encode|e('html_attr') }}" aria-label="{{ 'Pie chart with the most frequent statements.'|trans }}" role="img"></canvas>
<canvas id="query-statistics-chart" data-chart-data="{{ chart_data|json_encode|e('html_attr') }}" aria-label="{{ t('Pie chart with the most frequent statements.') }}" role="img"></canvas>
</div>
</div>
{% endif %}

View File

@ -3,8 +3,8 @@
{% block content %}
{% if is_data_loaded %}
<div class="row"><h3>{{ 'Network traffic since startup: %s'|trans|format(network_traffic) }}</h3></div>
<div class="row"><p>{{ 'This MySQL server has been running for %1$s. It started up on %2$s.'|trans|format(uptime, start_time) }}</p></div>
<div class="row"><h3>{{ t('Network traffic since startup: %s')|format(network_traffic) }}</h3></div>
<div class="row"><p>{{ t('This MySQL server has been running for %1$s. It started up on %2$s.')|format(uptime, start_time) }}</p></div>
<div class="row align-items-start">
<table class="table table-striped table-hover col-12 col-md-5 w-auto">
@ -12,7 +12,7 @@
<tr>
<th scope="col">
{% trans 'Traffic' %}
{{ show_hint('On a busy server, the byte counters may overrun, so those statistics as reported by the MySQL server may be incorrect.'|trans) }}
{{ show_hint(t('On a busy server, the byte counters may overrun, so those statistics as reported by the MySQL server may be incorrect.')) }}
</th>
<th class="text-end" scope="col">#</th>
<th class="text-end" scope="col">{% trans 'ø per hour' %}</th>
@ -72,7 +72,7 @@
{% endif %}
{% else %}
{{ 'Not enough privilege to view server status.'|trans|error }}
{{ t('Not enough privilege to view server status.')|error }}
{% endif %}
{% endblock %}

View File

@ -136,7 +136,7 @@
</table>
</div>
{% else %}
{{ 'Not enough privilege to view status variables.'|trans|error }}
{{ t('Not enough privilege to view status variables.')|error }}
{% endif %}
{% endblock %}

View File

@ -2,7 +2,7 @@
{% set header = {
'privileges': {
'image': 'b_usrlist',
'text': 'Privileges'|trans
'text': t('Privileges')
}
} %}
<h2>

View File

@ -1,25 +1,25 @@
<div class="container">
{% if user_group == null %}
<h2>{{ 'Add user group'|trans }}</h2>
<h2>{{ t('Add user group') }}</h2>
{% else %}
<h2>{{ 'Edit user group: \'%s\''|trans|format(edit_user_group_special_chars)|raw }}</h2>
<h2>{{ t('Edit user group: \'%s\'')|format(edit_user_group_special_chars)|raw }}</h2>
{% endif %}
<form action="{{ user_group_url|raw }}" method="post" class="card disableAjax">
{{ hidden_inputs|raw }}
<div class="card-header">{{ 'User group menu assignments'|trans }}</div>
<div class="card-header">{{ t('User group menu assignments') }}</div>
<div class="card-body">
{% if user_group == null %}
<div class="mb-3">
<label class="form-label" for="userGroup">{{ 'Group name:'|trans }}</label>
<label class="form-label" for="userGroup">{{ t('Group name:') }}</label>
<input class="form-control" type="text" name="userGroup" id="userGroup" maxlength="64" autocomplete="off" required>
</div>
{% endif %}
<div class="form-check mb-3">
<input class="form-check-input checkall_box" type="checkbox" id="addUsersForm_checkall" title="{{ 'Check all'|trans }}">
<label class="form-check-label" for="addUsersForm_checkall">{{ 'Check all'|trans }}</label>
<input class="form-check-input checkall_box" type="checkbox" id="addUsersForm_checkall" title="{{ t('Check all') }}">
<label class="form-check-label" for="addUsersForm_checkall">{{ t('Check all') }}</label>
</div>
<div class="row">
@ -28,7 +28,7 @@
</div>
<div class="card-footer">
<input class="btn btn-primary" type="submit" value="{{ user_group == null ? 'Add user group'|trans : 'Edit user group'|trans }}">
<input class="btn btn-primary" type="submit" value="{{ user_group == null ? t('Add user group') : t('Edit user group') }}">
</div>
</form>
</div>

View File

@ -34,7 +34,7 @@
&nbsp;&nbsp;
<a class="" href="{{ groupName.userGroupUrl|raw }}" data-post="{{ groupName.editUsersUrl|raw }}">{{ groupName.editUsersIcon|raw }}</a>
<button type="button" class="btn btn-link" data-bs-toggle="modal" data-bs-target="#deleteUserGroupModal" data-user-group="{{ groupName.name }}">
{{ get_icon('b_drop', 'Delete'|trans) }}
{{ get_icon('b_drop', t('Delete')) }}
</button>
</td>
</tr>

View File

@ -1,4 +1,4 @@
<h2>{{ 'Users of \'%s\' user group'|trans|format(user_group_special_chars)|raw }}</h2>
<h2>{{ t('Users of \'%s\' user group')|format(user_group_special_chars)|raw }}</h2>
{% if users|length == 0 %}
<p>{% trans 'No users were found belonging to this user group.' %}</p>
{% else %}

View File

@ -9,12 +9,12 @@
{% if variables is not empty %}
<a href="#" class="ajax saveLink hide">
{{ get_icon('b_save', 'Save'|trans) }}
{{ get_icon('b_save', t('Save')) }}
</a>
<a href="#" class="cancelLink hide">
{{ get_icon('b_close', 'Cancel'|trans) }}
{{ get_icon('b_close', t('Cancel')) }}
</a>
{{ get_image('b_help', 'Documentation'|trans, {
{{ get_image('b_help', t('Documentation'), {
'class': 'hide',
'id': 'docImage'
}) }}
@ -38,10 +38,10 @@
<tr class="var-row" data-filter-row="{{ variable.name|upper }}">
<td>
{% if variable.is_editable %}
<a href="#" data-variable="{{ variable.name }}" class="editLink">{{ get_icon('b_edit', 'Edit'|trans) }}</a>
<a href="#" data-variable="{{ variable.name }}" class="editLink">{{ get_icon('b_edit', t('Edit')) }}</a>
{% else %}
<span title="{% trans 'This is a read-only variable and can not be edited' %}" class="read_only_var">
{{ get_icon('bd_edit', 'Edit'|trans) }}
{{ get_icon('bd_edit', t('Edit')) }}
</span>
{% endif %}
</td>
@ -77,7 +77,7 @@
</div>
{% else %}
{{ 'Not enough privilege to view server variables and settings. %s'|trans|format(
{{ t('Not enough privilege to view server variables and settings. %s')|format(
link_to_var_documentation('show_compatibility_56', is_mariadb)
)|error }}
{% endif %}

View File

@ -6,7 +6,7 @@
<bdo lang="en" dir="ltr">
<label for="lang">
{% trans 'Language' %}
{{ 'Language'|trans != 'Language' ? ' - Language' }}
{{ t('Language') != 'Language' ? ' - Language' }}
</label>
</bdo>
<br>
@ -113,7 +113,7 @@
<label for="DefaultLang">{% trans 'Default language' %}</label>
<span class="doc">
<a href="{{ get_docu_link('config', 'cfg_DefaultLang', '../') }}" target="_blank" rel="noreferrer noopener">
{{- get_image('b_help', 'Documentation'|trans) -}}
{{- get_image('b_help', t('Documentation')) -}}
</a>
</span>
</th>
@ -131,7 +131,7 @@
<label for="ServerDefault">{% trans 'Default server' %}</label>
<span class="doc">
<a href="{{ get_docu_link('config', 'cfg_ServerDefault', '../') }}" target="_blank" rel="noreferrer noopener">
{{- get_image('b_help', 'Documentation'|trans) -}}
{{- get_image('b_help', t('Documentation')) -}}
</a>
</span>
</th>

View File

@ -8,7 +8,7 @@
<input type="hidden" name="bkm_fields[bkm_sql_query]" value="{{ sql_query }}">
<input type="hidden" name="store_bkm" value="1">
<div class="card-header">{{ get_icon('b_bookmark', 'Bookmark this SQL query'|trans, true) }}</div>
<div class="card-header">{{ get_icon('b_bookmark', t('Bookmark this SQL query'), true) }}</div>
<div class="card-body">
<div class="mb-3">
<label class="form-label" for="bookmarkLabelField">{% trans 'Bookmark label:' %}</label>

View File

@ -12,7 +12,7 @@
{{ link_or_button(
url('/view/create'),
{'db': db, 'table': table, 'printview': '1', 'sql_query': sql_query},
get_icon('b_view_add', 'Create view'|trans, true),
get_icon('b_view_add', t('Create view'), true),
{'class': 'create_view ajax btn'}
) }}
</span>

View File

@ -63,7 +63,7 @@
</div>
<div class="col">
<canvas id="profilingChartCanvas" data-chart-data="{{ profiling.chart|json_encode|e('html_attr') }}" aria-label="{{ 'Pie chart with profiling results.'|trans }}" role="img"></canvas>
<canvas id="profilingChartCanvas" data-chart-data="{{ profiling.chart|json_encode|e('html_attr') }}" aria-label="{{ t('Pie chart with profiling results.') }}" role="img"></canvas>
</div>
</div>
</div>

View File

@ -99,7 +99,7 @@
<div class="mb-3">
<label class="form-label" for="xAxisLabelInput">{% trans 'X-Axis label:' %}</label>
<input class="form-control" type="text" name="xAxisLabelInput" id="xAxisLabelInput" value="{{ xaxis == -1 ? 'X Values'|trans : keys[xaxis] }}">
<input class="form-control" type="text" name="xAxisLabelInput" id="xAxisLabelInput" value="{{ xaxis == -1 ? t('X Values') : keys[xaxis] }}">
</div>
<div class="mb-3">
@ -144,7 +144,7 @@
<div id="resizer" class="mt-3">
<div class="position-absolute top-0 end-0 mt-1 me-1">
<a class="disableAjax" id="saveChart" href="#" download="chart.png">
{{ get_image('b_saveimage', 'Save chart as image'|trans) }}
{{ get_image('b_saveimage', t('Save chart as image')) }}
</a>
</div>
<div id="querychart" dir="ltr"></div>

View File

@ -4,7 +4,7 @@
{% if export_type == 'raw' %}
{% trans %}Exporting a raw query{% notes %}A query that the user has written freely{% endtrans %}
{% else %}
{{ 'Exporting rows from "%s" table'|trans|format(table) }}
{{ t('Exporting rows from "%s" table')|format(table) }}
{% endif %}
{% endblock %}

View File

@ -1,19 +1,19 @@
<ul class="nav nav-pills m-2">
<li class="nav-item">
<a class="nav-link disableAjax" href="{{ url('/table/search', {'db': db, 'table': table, 'pos': 0}) }}">
{{ get_icon('b_search', 'Table search'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_search', t('Table search'), false, false, 'TabsMode') }}
</a>
</li>
<li class="nav-item">
<a class="nav-link disableAjax" href="{{ url('/table/zoom-search', {'db': db, 'table': table}) }}">
{{ get_icon('b_select', 'Zoom search'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_select', t('Zoom search'), false, false, 'TabsMode') }}
</a>
</li>
<li class="nav-item">
<a class="nav-link active disableAjax" href="{{ url('/table/find-replace', {'db': db, 'table': table}) }}">
{{ get_icon('b_find_replace', 'Find and replace'|trans, false, false, 'TabsMode') }}
{{ get_icon('b_find_replace', t('Find and replace'), false, false, 'TabsMode') }}
</a>
</li>
</ul>

Some files were not shown because too many files have changed in this diff Show More