0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-14 13:58:53 +08:00
discourse/plugins/discourse-data-explorer/config/locales/client.en.yml
Natalie Tay 2598983e02
UX: Data explorer improvements (#40605)
Small updates to data explorer:

For `/new` (AI query creation)
- Auto-runs the generated query and shows the result first, mirroring
/edit
- New admin-only POST queries/preview endpoint runs unsaved SQL so
results can be previewed before creating a query
- Chart / table / SQL segmented control similar to /edit
  - SQL with a resizable grippie
- "Save query" is now the primary button
- added a "Run" button.
- Saving transitions to /edit and auto-runs (?run=true).
- More breathing room between SQL and the name/description fields.

For `/edit`
- Disables Run / Save-and-run / Undo / Help / Delete while a query is
running or AI is generating.

Charts & tables (shared QueryResult)
- Smarter default view: falls back to table when a chart would silently
drop columns (e.g. user / username / reason / sum) pure-numeric series
still chart.
- long tables now cap at chart height with a chevron expand button, so
action buttons stay reachable (this was done before)
- /g/x/reports also have memory over which option (chart/table) was
chosen before

Copy (i18n)
- "Re-generate" to "Update prompt".
2026-06-05 19:31:37 +08:00

212 lines
8.9 KiB
YAML
Vendored
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

en:
admin_js:
admin:
site_settings:
categories:
discourse_data_explorer: "Discourse Data Explorer"
js:
discourse_ai:
features:
data_explorer:
name: "Data Explorer"
description: "AI-powered query generation for Data Explorer"
query_generation: "Query Generation"
errors:
explorer:
no_semicolons: "Remove the semicolons from the query."
dirty: "You must save the query before running."
data_explorer:
admin_dashboard_card:
no_results: "No results"
manage_reports_hint:
title: "Create a Data Explorer query"
description: "Write a custom SQL query to surface anything specific to your community."
explorer:
default_query: "Default"
default_query_notice: "This is a default query, the SQL cannot be edited. To edit the SQL, create a new query."
queries: "Queries"
query_created: "Query created!"
mode:
label: "Query authoring mode"
manual: "Write SQL"
ai: "Generate with AI"
or: "or"
admins_only: "The data explorer is only available to admins."
allow_groups: "Allow groups to access this query"
title: "Data Explorer"
create: "Create"
create_placeholder: "Query name..."
description_placeholder: "Enter a description here"
ai:
description_title: "Generate with AI"
description_hint: "Describe what you want in plain language. We'll generate the SQL, name, and description for you."
description_placeholder: "e.g. Show me signups across time"
regenerate_placeholder: "e.g. Update the query to limit to 50 results"
prompt_label: "Prompt"
generate: "Generate"
regenerate: "Update prompt"
generating: "Generating query with AI..."
generation_timeout: "AI query generation timed out. You can write the SQL manually."
generation_error: "Something went wrong generating the query."
save_query: "Save query"
write_manually: "Write SQL manually"
sql_label: "SQL"
optional: "optional"
import:
label: "Import"
unparseable_json: "Unparseable JSON file."
wrong_json: "Wrong JSON file. A JSON file should contain a 'query' object, which should at least have an 'sql' property."
help:
label: "Help"
modal_title: "Data Explorer Help"
auto_resolution: "<h2>Automatic entity resolution</h2>
<p>When your query returns an entity id, Data Explorer may automatically substitute it with
the entity name and other useful information in query results. Automatic resolution is available for
<i><b>user_id</b></i>, <i><b>group_id</b></i>, <i><b>topic_id</b></i>, <i><b>category_id</b></i>
and <i><b>badge_id</b></i>. To try this out run this query:</p>
<pre><code>SELECT user_id\nFROM posts</code></pre>"
custom_params: "<h2>Creating custom parameters</h2>
<p>To create custom parameters for your queries, put this at the top of your query and follow the format:</p>
<pre><code>-- [params]\n-- int :num = 1\n\nSELECT :num</code></pre>
<p><i>Note: the first line with [params] is required, along with two dashes preceding it and every
custom parameter you want to declare.</i></p>"
default_values: "<h3>Default values</h3>
<p>You can declare parameters with or without default values. Default values will show up in a text field
below the query editor, which you can edit to your needs. Parameters declared without default values will
still generate a text field, but will be empty and highlighted red.</p>
<pre><code>-- [params]\n-- text :username = my_username\n-- int :age</code></pre>"
data_types: "<h3>Data types</h3>
<p>Here are common data types you can use:</p>
<ul>
<li><b>integer</b> - signed four-byte Integer</li>
<li><b>text</b> - variable-length character string</li>
<li><b>boolean</b> true/false</li>
<li><b>date</b> - calendar date (year, month, day)</li>
<li><b>current_user_id</b> - ID of the user running the query (auto-injected, useful for group reports)</li>
</ul>
<p>For more information on data types, visit
<a href='http://www.postgresql.org/docs/9.3/static/datatype.html#DATATYPE-TABLE' target='_blank'>this website</a>.</p>"
schema:
title: "Database Schema"
filter: "Search..."
search_tables: "Search tables"
sensitive: "The contents of this column may contain particularly sensitive or private information. Please exercise caution when using the contents of this column."
types:
bool:
yes: "Yes"
no: "No"
null_: "Null"
view_json: "View JSON"
save: "Save changes"
saverun: "Save changes and run"
run: "Run"
undo: "Discard changes"
delete: "Delete"
recover: "Undelete query"
sql_label: "SQL"
run_with_explain: "Run with query plan"
run_options: "More run options"
view:
label: "Result view"
chart_empty:
no_rows: "No rows to chart."
no_numeric: "This query has no numeric columns to chart."
no_numeric_with_columns: "This query has no numeric columns to chart (ignored: %{columns})."
view_as_table: "View as table"
chart_footnote:
ignored: "Columns not charted: %{columns}"
export_as:
label: "Export as…"
results_json: "Results (JSON)"
results_csv: "Results (CSV)"
query_json: "Query definition (JSON)"
others_dirty: "A query has unsaved changes that will be lost if you navigate away."
run_time: "Query completed in %{value} ms."
cached_result_notice: "Showing cached results from %{relative_time}."
result_count:
one: "%{count} result."
other: "%{count} results."
max_result_count:
one: "Showing top %{count} result."
other: "Showing top %{count} results."
query_name: "Query"
query_groups: "Groups"
link: "Link for"
report_name: "Report"
query_description: "Description"
query_time: "Last run"
query_user: "Created by"
column: "Column %{number}"
save_params: "Set defaults"
reset_params: "Reset"
search_placeholder: "Search..."
no_search_results: "Sorry, we couldn't find any results matching your text."
form:
errors:
invalid: "Invalid"
no_such_category: "No such category"
no_such_group: "No such group"
invalid_date: "%{date} is an invalid date"
invalid_time: "%{time} is an invalid time"
group:
reports: "Reports"
admin:
api:
scopes:
descriptions:
data_explorer:
run_queries: "Run Data Explorer queries. Restrict the API key to a set of queries by specifying queries IDs."
discourse_workflows:
node_unavailable:
requires_data_explorer: "Requires the Data Explorer plugin to be enabled"
nodes:
"action:sql": "Data Explorer"
node_descriptions:
"action:sql": "Run a read-only SQL query against the database"
sql:
operation: "Operation"
operation_description: "How to run the query"
queries: "Queries"
raw: "Raw SQL"
query_id: "Query"
query_id_description: "Select a saved query to run"
query_params: "Query parameters"
query_params_description: "Fill in the parameters for the selected query"
query: "SQL query"
query_description: "Write a read-only SQL query. Declare parameters with Data Explorer syntax and map their values below."
params: "Query parameters"
params_description: "Parameters can be used as :my_param in the SQL query."
add_param: "Add parameter"
param_name: "Param"
param_value: "Value"
output:
results: "Results"
no_results: "No results"
discourse_automation:
scriptables:
recurring_data_explorer_result_pm:
fields:
recipients:
label: Send to User, Group or Email
query_id:
label: Data Explorer Query
query_params:
label: Data Explorer Query parameters
skip_empty:
label: Skip sending PM if there are no results
attach_csv:
label: Attach the CSV file to the PM
users_from_group:
label: Send individual PM to each group member
recurring_data_explorer_result_topic:
fields:
topic_id:
label: The topic to post query results in
query_id:
label: Data Explorer Query
query_params:
label: Data Explorer Query parameters
skip_empty:
label: Skip posting if there are no results
attach_csv:
label: Attach the CSV file to the post