DEV: Deprecate theme component for migration to core (#74)

This commit is contained in:
Keegan George 2023-11-30 10:54:37 -08:00 committed by GitHub
parent 10a3c21551
commit 924bca8840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
80 changed files with 6 additions and 49037 deletions

View File

@ -1,3 +1,4 @@
< v3.2.0.beta4-dev: 10a3c21551ab5f8ffc094ba64a967ecbf5ed5eba
< 3.2.0.beta2: f076c50946b5969175d45fdd2fb6194f43394e24
3.1.999: 04b36c68012fba9778e400e83b0b01d7947b2cdf
3.1.0.beta2: 850e31c83d310a1b52e6105fe201eb96f9e33deb

View File

@ -1,8 +0,0 @@
{
"extends": "eslint-config-discourse",
"ignorePatterns": ["javascripts/vendor/*", "assets/vendor/*"],
"globals": {
"settings": "readonly",
"themePrefix": "readonly"
}
}

View File

@ -1,11 +0,0 @@
name: Discourse Theme
on:
push:
branches:
- main
pull_request:
jobs:
ci:
uses: discourse/.github/.github/workflows/discourse-theme.yml@v1

3
.gitignore vendored
View File

@ -1,3 +0,0 @@
.discourse-site
node_modules
HELP

View File

@ -1 +0,0 @@
{}

View File

@ -1,4 +0,0 @@
module.exports = {
plugins: ["ember-template-lint-plugin-discourse"],
extends: "discourse:recommended",
};

View File

@ -1,5 +1,9 @@
# Discourse Table Builder
> ⚠️ **This theme component is deprecated and has now been bundled into core Discourse. Please remove it from your forum.**
---
![cover](.github/images/banner.png)
A theme component that allows for easiy building and editing of markdown tables in Discourse.

View File

@ -7,16 +7,5 @@
"learn_more": "TODO",
"theme_version": "0.0.1",
"minimum_discourse_version": "2.9.0.beta9",
"maximum_discourse_version": null,
"assets": {
"jsuites": "assets/vendor/jsuites.js",
"jspreadsheet": "assets/vendor/jspreadsheet.js"
},
"modifiers": {
"svg_icons": [
"align-left",
"align-center",
"align-right"
]
}
"maximum_discourse_version": "v3.2.0.beta4-dev"
}

File diff suppressed because it is too large Load Diff

12414
assets/vendor/jsuites.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,88 +0,0 @@
#!/bin/bash
# Global Variables:
SCSS_VENDOR=scss/vendor/
JS_VENDOR=assets/vendor/
JSUITES_JS_URL="https://jsuites.net/v4/jsuites.js"
JSPREADSHEET_JS_URL="https://bossanova.uk/jspreadsheet/v4/jexcel.js"
JSUITES_CSS_URL="https://raw.githubusercontent.com/jsuites/jsuites/master/dist/jsuites.css"
JSPREADSHEET_CSS_URL="https://bossanova.uk/jspreadsheet/v4/jexcel.css"
JSUITES_CSS_FILE=jsuites.css
JSUITES_SCSS_FILE=jsuites.scss
JSUITES_SCSS_FILE_LOCATION=$SCSS_VENDOR$JSUITES_SCSS_FILE
JSUITES_JS_FILE=jsuites.js
JSUITES_NEW_JS_FILE=jsuites.js
JSUITES_JS_FILE_LOCATION=$JS_VENDOR$JSUITES_NEW_JS_FILE
JSPREADSHEET_CSS_FILE=jexcel.css
JSPREADSHEET_SCSS_FILE=jspreadsheet.scss
JSPREADSHEET_SCSS_FILE_LOCATION=$SCSS_VENDOR$JSPREADSHEET_SCSS_FILE
JSPREADSHEET_JS_FILE=jexcel.js
JSPREADSHEET_NEW_JS_FILE=jspreadsheet.js
JSPREADSHEET_JS_FILE_LOCATION=$JS_VENDOR$JSPREADSHEET_NEW_JS_FILE
# Remove all vendor related files:
rm -r ${SCSS_VENDOR}*
rm -r ${JS_VENDOR}
# Recreate vendor directory
mkdir $JS_VENDOR
echo "Old vendor assets have been removed."
# STYLESHEETS:
# Add JSuite vendor file
if test -f "$JSUITES_CSS_FILE"; then
echo "$JSUITES_CSS_FILE already exists."
else
# Fetch jsuite stylesheet
wget $JSUITES_CSS_URL
echo "$JSUITES_CSS_FILE has been created in $(pwd)"
# Move jsuite stylesheet to vendor as a scss file
mv $JSUITES_CSS_FILE $JSUITES_SCSS_FILE_LOCATION
echo "$JSUITES_SCSS_FILE has been placed in the scss vendor directory"
# Scope styles to jexcel_container class
sed -i '' '1s/^/.jexcel_container {\n/' $JSUITES_SCSS_FILE_LOCATION
sed -i '' '$a\
}' $JSUITES_SCSS_FILE_LOCATION
# Remove conflicting animation classes
# TODO: Improve below code to handle nested code blocks
fi
# Add JSpreadsheet vendor file
if test -f "$JSPREADSHEET_CSS_FILE"; then
echo "$JSPREADSHEET_CSS_FILE already exists."
else
# Fetch jspreadsheet stylesheet
wget $JSPREADSHEET_CSS_URL
echo "$JSPREADSHEET_CSS_FILE has been created in $(pwd)"
# Move jspreadsheet stylesheet to vendor as a scss file
mv $JSPREADSHEET_CSS_FILE $JSPREADSHEET_SCSS_FILE_LOCATION
fi
# Apply prettier to vendor files
yarn prettier --write $SCSS_VENDOR
# JAVASCRIPTS:
if test -f "$JSUITES_JS_FILE"; then
echo "$JSUITES_JS_FILE already exists."
else
wget $JSUITES_JS_URL
mv $JSUITES_JS_FILE $JSUITES_JS_FILE_LOCATION
fi
if test -f "$JSPREADSHEET_JS_FILE"; then
echo "$JSPREADSHEET_JS_FILE already exists."
else
wget $JSPREADSHEET_JS_URL
mv $JSPREADSHEET_JS_FILE $JSPREADSHEET_JS_FILE_LOCATION
fi

View File

@ -1,5 +0,0 @@
@import "vendor/jspreadsheet";
@import "vendor/jsuites";
@import "theme/jspreadsheet-theme";
@import "post/table-edit-decorator";
@import "modal/insert-table-modal";

View File

@ -1,77 +0,0 @@
/* eslint-disable */
/**
* Generate markdown table from an array of objects
* Inspired by https://github.com/Ygilany/array-to-table
*
* @param {Array} array Array of objects
* @param {Array} columns Column headings
* @param {String} colPrefix Table column prefix
*
* @return {String} Markdown table
*/
export function arrayToTable(array, cols, colPrefix = "col") {
var table = "";
// Generate table headers
table += "|";
table += cols.join(" | ");
table += "|\r\n|";
// Generate table header separator
table += cols
.map(function () {
return "---";
})
.join(" | ");
table += "|\r\n";
// Generate table body
array.forEach(function (item) {
table += "|";
table +=
cols
.map(function (_key, index) {
return String(item[`${colPrefix}${index}`] || "").replace(
/\r?\n|\r/g,
" "
);
})
.join(" | ") + "|\r\n";
});
return table;
}
/**
*
* @returns a regular expression finding all markdown tables
*/
export function findTableRegex() {
return /((\r?){2}|^)(^\|[^\r\n]*(\r?\n)?)+(?=(\r?\n){2}|$)/gm;
}
export function tokenRange(tokens, start, end) {
const contents = [];
let startPushing = false;
let items = [];
tokens.forEach((token) => {
if (token.type === start) {
startPushing = true;
}
if (token.type === end) {
contents.push(items);
items = [];
startPushing = false;
}
if (startPushing) {
items.push(token);
}
});
return contents;
}

View File

@ -1,19 +0,0 @@
import { apiInitializer } from "discourse/lib/api";
import SpreadsheetEditor from "../components/spreadsheet-editor";
export default apiInitializer("1.13.0", (api) => {
const modal = api.container.lookup("service:modal");
api.addComposerToolbarPopupMenuOption({
icon: "table",
label: themePrefix("discourse_table_builder.composer.button"),
action: (toolbarEvent) => {
modal.show(SpreadsheetEditor, {
model: {
toolbarEvent,
tableTokens: null,
},
});
},
});
});

View File

@ -1,105 +0,0 @@
import { apiInitializer } from "discourse/lib/api";
import SpreadsheetEditor from "../components/spreadsheet-editor";
import { schedule } from "@ember/runloop";
import I18n from "I18n";
import { iconNode } from "discourse-common/lib/icon-library";
import { create } from "virtual-dom";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { parseAsync } from "discourse/lib/text";
import { tokenRange } from "../../discourse-table-builder/lib/utilities";
export default apiInitializer("0.11.1", (api) => {
const modal = api.container.lookup("service:modal");
function createButton() {
const openPopupBtn = document.createElement("button");
openPopupBtn.classList.add(
"open-popup-link",
"btn-default",
"btn",
"btn-icon",
"btn-edit-table",
"no-text"
);
const editIcon = create(
iconNode("pencil-alt", { class: "edit-table-icon" })
);
openPopupBtn.title = I18n.t(
themePrefix("discourse_table_builder.edit.btn_edit")
);
openPopupBtn.append(editIcon);
return openPopupBtn;
}
function generateModal() {
const tableIndex = this.tableIndex;
return ajax(`/posts/${this.id}`, { type: "GET" })
.then((post) =>
parseAsync(post.raw).then((tokens) => {
const allTables = tokenRange(tokens, "table_open", "table_close");
const tableTokens = allTables[tableIndex];
modal.show(SpreadsheetEditor, {
model: {
post,
tableIndex,
tableTokens,
},
});
})
)
.catch(popupAjaxError);
}
function generatePopups(tables, attrs) {
tables.forEach((table, index) => {
const popupBtn = createButton();
table.parentNode.setAttribute("data-table-index", index);
table.parentNode.classList.add("fullscreen-table-wrapper");
const expandBtn = table.parentNode.querySelector(".open-popup-link");
if (table.parentNode.contains(expandBtn)) {
expandBtn.parentNode.insertBefore(popupBtn, expandBtn);
} else {
const buttonWrapper = document.createElement("div");
buttonWrapper.classList.add("fullscreen-table-wrapper--buttons");
buttonWrapper.append(popupBtn);
table.parentNode.insertBefore(buttonWrapper, table);
}
popupBtn.addEventListener(
"click",
generateModal.bind({ tableIndex: index, ...attrs }),
false
);
});
}
function cleanupPopupBtns() {
const popupBtns = document.querySelectorAll("button.open-popup-link");
popupBtns.forEach((btn) => btn.removeEventListener("click", generateModal));
}
api.decorateCookedElement(
(post, helper) => {
const canEdit = helper.widget.attrs.canEdit;
if (!canEdit) {
return;
}
schedule("afterRender", () => {
const tables = post.querySelectorAll(".md-table table");
generatePopups(tables, helper.widget.attrs);
});
},
{
onlyStream: true,
id: "edit-table",
}
);
api.cleanupStream(cleanupPopupBtns);
});

View File

@ -1,74 +0,0 @@
<DModal
@title={{i18n this.modalAttributes.title}}
@closeModal={{this.interceptCloseModal}}
class="insert-table-modal"
>
<:body>
<ConditionalLoadingSpinner @condition={{this.loading}}>
<div
{{did-insert this.createSpreadsheet}}
tabindex="1"
class="jexcel_container"
></div>
</ConditionalLoadingSpinner>
</:body>
<:footer>
<div class="primary-actions">
<DButton
@class="btn-insert-table"
@label={{this.modalAttributes.insertTable.title}}
@icon={{this.modalAttributes.insertTable.icon}}
@action={{this.insertTable}}
/>
<DModalCancel @close={{this.interceptCloseModal}} />
</div>
<div class="secondary-actions">
{{#if this.isEditingTable}}
<div class="edit-reason">
<DButton
@icon="info-circle"
@title={{theme-prefix
"discourse_table_builder.edit.modal.trigger_reason"
}}
@action={{this.showEditReasonField}}
@class="btn-edit-reason"
/>
{{#if this.showEditReason}}
<TextField
@value={{this.editReason}}
@placeholderKey={{theme-prefix
"discourse_table_builder.edit.modal.reason"
}}
/>
{{/if}}
</div>
{{/if}}
<DTooltip
@icon="question"
@triggers="click"
@arrow={{false}}
class="btn btn-icon no-text"
>
<ul>
<h4>{{theme-i18n "discourse_table_builder.modal.help.title"}}</h4>
<li>
<kbd>
{{theme-i18n "discourse_table_builder.modal.help.enter_key"}}
</kbd>
{{theme-i18n "discourse_table_builder.modal.help.new_row"}}
</li>
<li>
<kbd>
{{theme-i18n "discourse_table_builder.modal.help.tab_key"}}
</kbd>
{{theme-i18n "discourse_table_builder.modal.help.new_col"}}
</li>
<li>{{theme-i18n "discourse_table_builder.modal.help.options"}}</li>
</ul>
</DTooltip>
</div>
</:footer>
</DModal>

View File

@ -1,323 +0,0 @@
import { action } from "@ember/object";
import loadScript from "discourse/lib/load-script";
import {
arrayToTable,
findTableRegex,
tokenRange,
} from "../../discourse-table-builder/lib/utilities";
import Component from "@glimmer/component";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import I18n from "I18n";
import { schedule } from "@ember/runloop";
import { tracked } from "@glimmer/tracking";
import { inject as service } from "@ember/service";
export default class SpreadsheetEditor extends Component {
@service dialog;
@tracked showEditReason = false;
@tracked loading = null;
spreadsheet = null;
defaultColWidth = 150;
isEditingTable = !!this.args.model.tableTokens;
// Getters:
get modalAttributes() {
if (this.isEditingTable) {
return {
title: themePrefix("discourse_table_builder.edit.modal.title"),
insertTable: {
title: themePrefix("discourse_table_builder.edit.modal.create"),
icon: "pencil-alt",
},
};
} else {
return {
title: themePrefix("discourse_table_builder.modal.title"),
insertTable: {
title: themePrefix("discourse_table_builder.modal.create"),
icon: "plus",
},
};
}
}
// Actions:
@action
createSpreadsheet(spreadsheet) {
this.spreadsheet = spreadsheet;
schedule("afterRender", () => {
this.loadLibraries().then(() => {
if (this.isEditingTable) {
this.buildPopulatedTable(this.args.model.tableTokens);
} else {
this.buildNewTable();
}
});
});
}
@action
showEditReasonField() {
this.showEditReason = !this.showEditReason;
}
@action
interceptCloseModal() {
if (this._hasChanges()) {
this.dialog.yesNoConfirm({
message: I18n.t(
themePrefix("discourse_table_builder.modal.confirm_close")
),
didConfirm: () => this.args.closeModal(),
});
} else {
this.args.closeModal();
}
}
@action
insertTable() {
const updatedHeaders = this.spreadsheet.getHeaders().split(","); // keys
const updatedData = this.spreadsheet.getData(); // values
const markdownTable = this.buildTableMarkdown(updatedHeaders, updatedData);
if (!this.isEditingTable) {
this.args.model.toolbarEvent.addText(markdownTable);
return this.args.closeModal();
} else {
return this.updateTable(markdownTable);
}
}
_hasChanges() {
if (this.isEditingTable) {
const originalSpreadsheetData = this.extractTableContent(
tokenRange(this.args.model.tableTokens, "tr_open", "tr_close")
);
const currentHeaders = this.spreadsheet.getHeaders().split(",");
const currentRows = this.spreadsheet.getData();
const currentSpreadsheetData = currentHeaders.concat(currentRows.flat());
return (
JSON.stringify(currentSpreadsheetData) !==
JSON.stringify(originalSpreadsheetData)
);
} else {
return this.spreadsheet
.getData()
.flat()
.some((element) => element !== "");
}
}
// Helper Methods:
loadLibraries() {
this.loading = true;
return loadScript(settings.theme_uploads_local.jsuites)
.then(() => {
return loadScript(settings.theme_uploads_local.jspreadsheet);
})
.finally(() => (this.loading = false));
}
buildNewTable() {
const data = [
["", "", ""],
["", "", ""],
["", "", ""],
["", "", ""],
["", "", ""],
["", "", ""],
];
const columns = [
{
title: I18n.t(
themePrefix("discourse_table_builder.default_header.col_1")
),
width: this.defaultColWidth,
},
{
title: I18n.t(
themePrefix("discourse_table_builder.default_header.col_2")
),
width: this.defaultColWidth,
},
{
title: I18n.t(
themePrefix("discourse_table_builder.default_header.col_3")
),
width: this.defaultColWidth,
},
{
title: I18n.t(
themePrefix("discourse_table_builder.default_header.col_4")
),
width: this.defaultColWidth,
},
];
return this.buildSpreadsheet(data, columns);
}
extractTableContent(data) {
return data
.flat()
.filter((t) => t.type === "inline")
.map((t) => t.content);
}
buildPopulatedTable(tableTokens) {
const contentRows = tokenRange(tableTokens, "tr_open", "tr_close");
const rows = [];
let headings;
const rowWidthFactor = 8;
contentRows.forEach((row, index) => {
if (index === 0) {
// headings
headings = this.extractTableContent(row).map((heading) => {
return {
title: heading,
width: Math.max(
heading.length * rowWidthFactor,
this.defaultColWidth
),
align: "left",
};
});
} else {
// rows:
rows.push(this.extractTableContent(row));
}
});
return this.buildSpreadsheet(rows, headings);
}
buildSpreadsheet(data, columns, opts = {}) {
const postNumber = this.args.model?.post_number;
const exportFileName = postNumber
? `post-${postNumber}-table-export`
: `post-table-export`;
// eslint-disable-next-line no-undef
this.spreadsheet = jspreadsheet(this.spreadsheet, {
data,
columns,
defaultColAlign: "left",
wordWrap: true,
csvFileName: exportFileName,
text: this.localeMapping(),
...opts,
});
}
buildUpdatedPost(tableIndex, raw, newRaw) {
const tableToEdit = raw.match(findTableRegex());
let editedTable;
if (tableToEdit.length) {
editedTable = raw.replace(tableToEdit[tableIndex], newRaw);
} else {
return raw;
}
// replace null characters
editedTable = editedTable.replace(/\0/g, "\ufffd");
return editedTable;
}
updateTable(markdownTable) {
const tableIndex = this.args.model.tableIndex;
const postId = this.args.model.post.id;
const newRaw = markdownTable;
const editReason =
this.editReason ||
I18n.t(themePrefix("discourse_table_builder.edit.default_edit_reason"));
const raw = this.args.model.post.raw;
const newPostRaw = this.buildUpdatedPost(tableIndex, raw, newRaw);
return this.sendTableUpdate(postId, newPostRaw, editReason);
}
sendTableUpdate(postId, raw, edit_reason) {
return ajax(`/posts/${postId}.json`, {
type: "PUT",
data: {
post: {
raw,
edit_reason,
},
},
})
.catch(popupAjaxError)
.finally(() => {
this.args.closeModal();
});
}
buildTableMarkdown(headers, data) {
const table = [];
data.forEach((row) => {
const result = {};
headers.forEach((_key, index) => {
const columnKey = `col${index}`;
return (result[columnKey] = row[index]);
});
table.push(result);
});
return arrayToTable(table, headers);
}
localeMapping() {
return {
noRecordsFound: prefixedLocale("no_records_found"),
show: prefixedLocale("show"),
entries: prefixedLocale("entries"),
insertANewColumnBefore: prefixedLocale("context_menu.col.before"),
insertANewColumnAfter: prefixedLocale("context_menu.col.after"),
deleteSelectedColumns: prefixedLocale("context_menu.col.delete"),
renameThisColumn: prefixedLocale("context_menu.col.rename"),
orderAscending: prefixedLocale("context_menu.order.ascending"),
orderDescending: prefixedLocale("context_menu.order.descending"),
insertANewRowBefore: prefixedLocale("context_menu.row.before"),
insertANewRowAfter: prefixedLocale("context_menu.row.after"),
deleteSelectedRows: prefixedLocale("context_menu.row.delete"),
copy: prefixedLocale("context_menu.copy"),
paste: prefixedLocale("context_menu.paste"),
saveAs: prefixedLocale("context_menu.save"),
about: prefixedLocale("about"),
areYouSureToDeleteTheSelectedRows: prefixedLocale(
"prompts.delete_selected_rows"
),
areYouSureToDeleteTheSelectedColumns: prefixedLocale(
"prompts.delete_selected_cols"
),
thisActionWillDestroyAnyExistingMergedCellsAreYouSure: prefixedLocale(
"prompts.will_destroy_merged_cells"
),
thisActionWillClearYourSearchResultsAreYouSure: prefixedLocale(
"prompts.will_clear_search_results"
),
thereIsAConflictWithAnotherMergedCell: prefixedLocale(
"prompts.conflict_with_merged_cells"
),
invalidMergeProperties: prefixedLocale("invalid_merge_props"),
cellAlreadyMerged: prefixedLocale("cells_already_merged"),
noCellsSelected: prefixedLocale("no_cells_selected"),
};
}
}
function prefixedLocale(localeString) {
return I18n.t(
themePrefix(`discourse_table_builder.spreadsheet.${localeString}`)
);
}

View File

@ -1,27 +0,0 @@
// Backwards compatility for core versions before 82b16f4f
// Can be removed once 3.2.0.beta1 is released, and the compat file is updated
const themeId = themePrefix("foo").match(/theme_translations\.(\d+)\.foo/)[1];
const base = `discourse/theme-${themeId}`;
if (!require.entries[`${base}/discourse/components/spreadsheet-editor`]) {
// eslint-disable-next-line no-console
console.warn(
"Running on an old version of core. discourse-table-builder is shimming modules to keep old imports working."
);
define(
`discourse/discourse-table-builder/lib/utilities`,
["exports", `${base}/discourse-table-builder/lib/utilities`],
function (_exports, utilities) {
_exports.tokenRange = utilities.tokenRange;
_exports.arrayToTable = utilities.arrayToTable;
_exports.findTableRegex = utilities.findTableRegex;
}
);
}
export default {
name: "add-template-module-shims",
initialize() {},
};

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
ar:
discourse_table_builder:
title: "أداة إنشاء الجداول"
composer:
button: "إدراج جدول"
modal:
title: "أداة إنشاء الجداول"
create: "إنشاء جدول"
help:
title: "استخدام محرر جداول البيانات"
enter_key: "Enter"
tab_key: "مفتاح Tab"
new_row: "في نهاية الصف لإدراج صف جديد."
new_col: "في نهاية العمود لإدراج عمود جديد."
options: "انقر بزر الماوس الأيمن على الخلايا للوصول إلى المزيد من الخيارات في القائمة المنسدلة."
edit:
btn_edit: "تعديل الجدول"
modal:
title: "تعديل الجدول"
cancel: "إلغاء"
create: "حفظ"
reason: "ما سبب التعديل؟"
trigger_reason: "أضِف سبب التعديل"
default_edit_reason: "تحديث الجدول باستخدام محرر الجداول"
default_header:
col_1: "العمود 1"
col_2: "العمود 2"
col_3: "العمود 3"
col_4: "العمود 4"
spreadsheet:
no_records_found: "لم يتم العثور على سجلات"
show: "إظهار"
entries: "إدخالات"
about: "نبذة"
prompts:
delete_selected_rows: "هل تريد بالتأكيد حذف الصفوف المحدَّدة؟"
delete_selected_cols: "هل تريد بالتأكيد حذف الأعمدة المحدَّدة؟"
will_destroy_merged_cells: "سيؤدي هذا الإجراء إلى تدمير أي خلايا مدموجة موجودة. هل أنت متأكد؟"
will_clear_search_results: "سيؤدي هذا الإجراء إلى تدمير أي خلايا مدموجة موجودة. هل أنت متأكد؟"
conflicts_with_merged_cells: "هناك تعارض مع خلية مدموجة أخرى"
invalid_merge_props: "خصائص الدمج غير صالحة"
cells_already_merged: "تم دمج الخلية بالفعل"
no_cells_selected: "لم يتم تحديد أي خلايا"
context_menu:
row:
before: "إدراج صف جديد قبله"
after: "إدراج صف جديد بعده"
delete: "حذف الصفوف المحدَّدة"
col:
before: "إدراج عمود جديد قبله"
after: "إدراج عمود جديد بعده"
delete: "حذف الأعمدة المحدَّدة"
rename: "إعادة تسمية هذا العمود"
order:
ascending: "ترتيب تصاعدي"
descending: "ترتيب تنازلي"
copy: "نسخ..."
paste: "لصق..."
save: "الحفظ باسم..."
theme_metadata:
description: "يضيف زرًا إلى أداة الإنشاء لإنشاء الجداول بسهولة بلغة Markdown"

View File

@ -1,15 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
be:
discourse_table_builder:
edit:
modal:
cancel: "адмена"
create: "захаваць"
reason: "чаму Вы рэдагуеце паведамленне?"
spreadsheet:
about: "Аб тэме"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
bg:
discourse_table_builder:
modal:
help:
enter_key: "Въведете"
edit:
modal:
cancel: "прекрати"
create: "Запази "
reason: "защо редактирате ?"
spreadsheet:
show: "Покажи"
about: "Относно"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
bs_BA:
discourse_table_builder:
modal:
help:
enter_key: "Naprijed"
edit:
modal:
cancel: "otkaži"
create: "Save"
reason: "zašto pravite izmjenu?"
spreadsheet:
show: "Show"
about: "O nama"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
ca:
discourse_table_builder:
modal:
help:
enter_key: "Retorn"
edit:
modal:
cancel: "cancel·la"
create: "Desa"
reason: "per què ho editeu?"
spreadsheet:
show: "Mostra"
about: "Quant a"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
cs:
discourse_table_builder:
edit:
modal:
cancel: "zrušit"
create: "Uložit"
reason: "proč byla nutná úprava?"
spreadsheet:
show: "Zobrazit"
about: "O fóru"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
da:
discourse_table_builder:
modal:
help:
enter_key: "Enter"
edit:
modal:
cancel: "annuller"
create: "Gem"
reason: "hvorfor redigerer du?"
spreadsheet:
show: "Vis"
about: "Om"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
de:
discourse_table_builder:
title: "Tabellenersteller"
composer:
button: "Tabelle einfügen"
modal:
title: "Tabellenersteller"
create: "Tabelle erstellen"
help:
title: "Verwendung des Tabellenkalkulationseditors"
enter_key: "Enter"
tab_key: "Tabulatur"
new_row: "am Ende einer Zeile, um eine neue Zeile einzufügen."
new_col: "am Ende einer Spalte, um eine neue Spalte einzufügen."
options: "Klicke mit der rechten Maustaste auf eine Zelle, um weitere Optionen in einem Drop-down-Menü aufzurufen."
edit:
btn_edit: "Tabelle bearbeiten"
modal:
title: "Tabelle bearbeiten"
cancel: "Abbrechen"
create: "Speichern"
reason: "Welchen Grund gibt es für die Bearbeitung?"
trigger_reason: "Grund für die Bearbeitung hinzufügen"
default_edit_reason: "Tabelle per Tabelleneditor aktualisieren"
default_header:
col_1: "Spalte 1"
col_2: "Spalte 2"
col_3: "Spalte 3"
col_4: "Spalte 4"
spreadsheet:
no_records_found: "Keine Datensätze gefunden"
show: "Anzeigen"
entries: "Einträge"
about: "Über"
prompts:
delete_selected_rows: "Bist du sicher, dass du die ausgewählten Zeilen löschen willst?"
delete_selected_cols: "Bist du sicher, dass du die ausgewählten Spalten löschen willst?"
will_destroy_merged_cells: "Durch diese Aktion werden alle vorhandenen zusammengeführten Zellen zerstört. Bist du sicher?"
will_clear_search_results: "Durch diese Aktion werden alle vorhandenen zusammengeführten Zellen zerstört. Bist du sicher?"
conflicts_with_merged_cells: "Es liegt ein Konflikt mit einer anderen zusammengeführten Zelle vor"
invalid_merge_props: "Ungültige zusammengeführte Eigenschaften"
cells_already_merged: "Zelle bereits zusammengeführt"
no_cells_selected: "Keine Zellen ausgewählt"
context_menu:
row:
before: "Davor neue Zeile einfügen"
after: "Danach neue Zeile einfügen"
delete: "Ausgewählte Zeilen löschen"
col:
before: "Davor neue Spalte einfügen"
after: "Danach neue Spalte einfügen"
delete: "Ausgewählte Spalten löschen"
rename: "Diese Spalte umbenennen"
order:
ascending: "Reihenfolge aufsteigend"
descending: "Reihenfolge absteigend"
copy: "Kopieren …"
paste: "Einfügen …"
save: "Speichern als …"
theme_metadata:
description: "Fügt dem Editor eine Schaltfläche hinzu, um einfach Tabellen in Markdown zu erstellen"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
el:
discourse_table_builder:
modal:
help:
enter_key: "Enter"
edit:
modal:
cancel: "ακύρωση"
create: "Αποθήκευση"
reason: "γιατί αναθεωρείς;"
spreadsheet:
show: "Εμφάνιση"
about: "Σχετικά"

View File

@ -1,62 +0,0 @@
en:
discourse_table_builder:
title: "Table Builder"
composer:
button: "Insert Table"
modal:
title: "Table Builder"
create: "Build Table"
help:
title: "Using the Spreadsheet Editor"
enter_key: "Enter"
tab_key: "Tab"
new_row: "at the end of a row to insert a new row."
new_col: "at the end of a column to insert a new column."
options: "Right-click on cells to access more options in a dropdown menu."
confirm_close: "Are you sure you want to close the table builder? Any unsaved changes will be lost."
edit:
btn_edit: "Edit Table"
modal:
title: "Edit Table"
cancel: "cancel"
create: "Save"
reason: "why are you editing?"
trigger_reason: "Add reason for edit"
default_edit_reason: "Update Table with Table Editor"
default_header:
col_1: "Column 1"
col_2: "Column 2"
col_3: "Column 3"
col_4: "Column 4"
spreadsheet:
no_records_found: "No records found"
show: "Show"
entries: "entries"
about: "About"
prompts:
delete_selected_rows: "Are you sure you want to delete the selected rows?"
delete_selected_cols: "Are you sure you want to delete the selected columns?"
will_destroy_merged_cells: "This action will destroy any existing merged cells. Are you sure?"
will_clear_search_results: "This action will destroy any existing merged cells. Are you sure?"
conflicts_with_merged_cells: "There is a conflict with another merged cell"
invalid_merge_props: "Invalid merged properties"
cells_already_merged: "Cell already merged"
no_cells_selected: "No cells selected"
context_menu:
row:
before: "Insert a new row before"
after: "Insert a new row after"
delete: "Delete selected rows"
col:
before: "Insert a new column before"
after: "Insert a new column after"
delete: "Delete selected columns"
rename: "Rename this column"
order:
ascending: "Order ascending"
descending: "Order descending"
copy: "Copy..."
paste: "Paste..."
save: "Save as..."
theme_metadata:
description: "Adds a button to the composer to easily build tables in markdown"

View File

@ -1,7 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
en_GB:

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
es:
discourse_table_builder:
title: "Creador de tablas"
composer:
button: "Insertar tabla"
modal:
title: "Creador de tablas"
create: "Crear tabla"
help:
title: "Usando el editor de hojas de cálculo"
enter_key: "Intro"
tab_key: "Tabulador"
new_row: "al final de una fila para insertar una nueva fila."
new_col: "al final de una columna para insertar una nueva columna."
options: "Haz clic con el botón derecho en las celdas para acceder a más opciones en un menú desplegable."
edit:
btn_edit: "Editar tabla"
modal:
title: "Editar tabla"
cancel: "cancelar"
create: "Guardar"
reason: "¿Por qué lo estás editando?"
trigger_reason: "Añadir motivo de la edición"
default_edit_reason: "Actualizar tabla con el editor de tablas"
default_header:
col_1: "Columna 1"
col_2: "Columna 2"
col_3: "Columna 3"
col_4: "Columna 4"
spreadsheet:
no_records_found: "No se han encontrado registros"
show: "Mostrar"
entries: "entradas"
about: "Acerca de"
prompts:
delete_selected_rows: "¿Seguro que quieres eliminar las filas seleccionadas?"
delete_selected_cols: "¿Seguro que quieres eliminar las columnas seleccionadas?"
will_destroy_merged_cells: "Esta acción destruirá cualquier celda fusionada existente. ¿Estás seguro/a?"
will_clear_search_results: "Esta acción destruirá cualquier celda fusionada existente. ¿Estás seguro/a?"
conflicts_with_merged_cells: "Hay un conflicto con otra celda fusionada."
invalid_merge_props: "Propiedades fusionadas no válidas"
cells_already_merged: "Celda ya fusionada"
no_cells_selected: "No hay celdas seleccionadas"
context_menu:
row:
before: "Insertar una nueva fila antes"
after: "Insertar una nueva fila después"
delete: "Eliminar filas seleccionadas"
col:
before: "Insertar una nueva columna antes"
after: "Insertar una nueva columna después"
delete: "Eliminar columnas seleccionadas"
rename: "Cambiar el nombre de esta columna"
order:
ascending: "Orden ascendente"
descending: "Orden descendente"
copy: "Copiar..."
paste: "Pegar..."
save: "Guardar como..."
theme_metadata:
description: "Añade un botón al compositor para crear fácilmente tablas en markdown"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
et:
discourse_table_builder:
edit:
modal:
cancel: "tühista"
create: "Salvesta"
reason: "miks sa seda muudad?"
spreadsheet:
show: "Näita"
about: "Teave"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
fa_IR:
discourse_table_builder:
modal:
help:
enter_key: "وارد شدن "
edit:
modal:
cancel: "لغو"
create: "ذخیره کردن"
reason: "چرا ویرایش می‌کنید؟"
spreadsheet:
show: "نشان دادن"
about: "درباره"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
fi:
discourse_table_builder:
title: "Taulukkotyökalu"
composer:
button: "Lisää taulukko"
modal:
title: "Taulukkotyökalu"
create: "Luo taulukko"
help:
title: "Laskentataulukkoeditorin käyttäminen"
enter_key: "Enter"
tab_key: "Sarkain"
new_row: "rivin lopussa uuden rivin lisäämiseksi."
new_col: "sarakkeen lopussa uuden sarakkeen lisäämiseksi."
options: "Napsauta soluja hiiren kakkospainikkeella nähdäksesi lisää vaihtoehtoja avattavassa valikossa."
edit:
btn_edit: "Muokkaa taulukkoa"
modal:
title: "Muokkaa taulukkoa"
cancel: "peruuta"
create: "Tallenna"
reason: "miksi muokkaat viestiä?"
trigger_reason: "Lisää muokkauksen syy"
default_edit_reason: "Päivitä taulukko taulukkoeditorilla"
default_header:
col_1: "Sarake 1"
col_2: "Sarake 2"
col_3: "Sarake 3"
col_4: "Sarake 4"
spreadsheet:
no_records_found: "Tietueita ei löydy"
show: "Näytä"
entries: "merkintää"
about: "Tietoja"
prompts:
delete_selected_rows: "Oletko varma, että haluat poistaa valitut rivit?"
delete_selected_cols: "Oletko varma, että haluat poistaa valitut sarakkeet?"
will_destroy_merged_cells: "Tämä toiminto tuhoaa olemassa olevat yhdistetyt solut. Oletko varma?"
will_clear_search_results: "Tämä toiminto tuhoaa olemassa olevat yhdistetyt solut. Oletko varma?"
conflicts_with_merged_cells: "Ristiriita toisen yhdistetyn solun kanssa"
invalid_merge_props: "Virheelliset yhdistetyt omaisuudet"
cells_already_merged: "Solu on jo yhdistetty"
no_cells_selected: "Ei valittuja soluja"
context_menu:
row:
before: "Lisää uusi rivi ennen"
after: "Lisää uusi rivi perään"
delete: "Poista valitut rivit"
col:
before: "Lisää uusi sarake ennen"
after: "Lisää uusi sarake perään"
delete: "Poista valitut sarakkeet"
rename: "Nimeä tämä sarake uudelleen"
order:
ascending: "Nouseva järjestys"
descending: "Laskeva järjestys"
copy: "Kopioi..."
paste: "Liitä..."
save: "Tallenna nimellä..."
theme_metadata:
description: "Lisää kirjoitustoimintoon painikkeen, jolla voi luoda taulukoita helposti käyttämällä markdownia"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
fr:
discourse_table_builder:
title: "Éditeur de tableaux"
composer:
button: "Insérer un tableau"
modal:
title: "Éditeur de tableaux"
create: "Créer un tableau"
help:
title: "Utiliser l'éditeur de tableaux"
enter_key: "Entrée"
tab_key: "Tabulation"
new_row: "à la fin d'une ligne pour en insérer une nouvelle."
new_col: "à la fin d'une colonne pour en insérer une nouvelle."
options: "Clic droit sur une cellule pour afficher des options contextuelles."
edit:
btn_edit: "Modifier le tableau"
modal:
title: "Modifier le tableau"
cancel: "annuler"
create: "Enregistrer"
reason: "pourquoi modifiez-vous le tableau ?"
trigger_reason: "Ajouter la raison de la modification"
default_edit_reason: "Modifier avec l'éditeur de tableaux"
default_header:
col_1: "Colonne 1"
col_2: "Colonne 2"
col_3: "Colonne 3"
col_4: "Colonne 4"
spreadsheet:
no_records_found: "Aucun enregistrement trouvé"
show: "Afficher"
entries: "entrées"
about: "À propos"
prompts:
delete_selected_rows: "Voulez-vous vraiment supprimer les lignes sélectionnées ?"
delete_selected_cols: "Voulez-vous vraiment supprimer les colonnes sélectionnées ?"
will_destroy_merged_cells: "Cette action détruira toutes les cellules fusionnées existantes. Voulez-vous continuer ?"
will_clear_search_results: "Cette action détruira toutes les cellules fusionnées existantes. Voulez-vous continuer ?"
conflicts_with_merged_cells: "Il y a un conflit avec une autre cellule fusionnée"
invalid_merge_props: "Propriétés fusionnées invalides"
cells_already_merged: "Cellule déjà fusionnée"
no_cells_selected: "Aucune cellule sélectionnée"
context_menu:
row:
before: "Insérer une nouvelle ligne avant"
after: "Insérer une nouvelle ligne après"
delete: "Supprimer les lignes sélectionnées"
col:
before: "Insérer une nouvelle colonne avant"
after: "Insérer une nouvelle colonne après"
delete: "Supprimer les colonnes sélectionnées"
rename: "Renommer cette colonne"
order:
ascending: "Ordre croissant"
descending: "Ordre décroissant"
copy: "Copier..."
paste: "Coller..."
save: "Enregistrer sous..."
theme_metadata:
description: "Ajouter un bouton à l'éditeur pour créer facilement des tableaux en Markdown"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
gl:
discourse_table_builder:
modal:
help:
enter_key: "Intro"
edit:
modal:
cancel: "cancelar"
create: "Gardar"
reason: "por que o está editando?"
spreadsheet:
show: "Amosar"
about: "Verbo de"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
he:
discourse_table_builder:
title: "בונה טבלאות"
composer:
button: "הוספת טבלה"
modal:
title: "בונה טבלאות"
create: "בניית טבלה"
help:
title: "באמצעות עורך גיליונות הנתונים"
enter_key: "Enter"
tab_key: "Tab"
new_row: "בסוף השורה כדי להוסיף שורה חדשה."
new_col: "בסוף העמודה כדי להוסיף עמודה חדשה."
options: "לחיצה ימנית על תאים מעניקה גישה לאפשרויות נוספות דרך תפריט נפתח."
edit:
btn_edit: "עריכת טבלה"
modal:
title: "עריכת טבלה"
cancel: "ביטול"
create: "שמירה"
reason: "מה סיבת העריכה?"
trigger_reason: "הוספת סיבה לעריכה"
default_edit_reason: "עדכון טבלה עם עורך טבלאות"
default_header:
col_1: "עמודה 1"
col_2: "עמודה 2"
col_3: "עמודה 3"
col_4: "עמודה 4"
spreadsheet:
no_records_found: "לא נמצאו רשומות"
show: "הצגה"
entries: "רשומות"
about: "על אודות"
prompts:
delete_selected_rows: "למחוק את השורות הנבחרות?"
delete_selected_cols: "למחוק את העמודות הנבחרות?"
will_destroy_merged_cells: "פעולה זו תשמיד את התאים הממוזגים באשר הם. להמשיך?"
will_clear_search_results: "פעולה זו תשמיד את התאים הממוזגים באשר הם. להמשיך?"
conflicts_with_merged_cells: "קיימת סתירה עם תא ממוזג אחר"
invalid_merge_props: "מאפיינים ממוזגים שגויים"
cells_already_merged: "התא כבר מוזג"
no_cells_selected: "לא נבחרו תאים"
context_menu:
row:
before: "הוספת שורה חדשה לפני"
after: "הוספת שורה חדשה אחרי"
delete: "מחיקת השורות הנבחרות"
col:
before: "הוספת עמודה חדשה לפני"
after: "הוספת עמודה חדשה אחרי"
delete: "מחיקת העמודות הנבחרות"
rename: "שינוי שם העמודה הזאת"
order:
ascending: "סדר עולה"
descending: "סדר יורד"
copy: "העתקה…"
paste: "הדבקה…"
save: "שמירה בשם…"
theme_metadata:
description: "מוסיף כפתור למחבר ההודעות כדי לבנות טבלאות ב־Markdown בקלות"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
hr:
discourse_table_builder:
modal:
help:
enter_key: "Unesi"
edit:
modal:
cancel: "otkaži"
create: "Spremi"
reason: "zašto izmjenjujete?"
spreadsheet:
show: "Pokaži"
about: "O nama"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
hu:
discourse_table_builder:
modal:
help:
enter_key: "Enter"
edit:
modal:
cancel: "mégse"
create: "Mentés"
reason: "miért szerkeszt?"
spreadsheet:
show: "Megjelenítés"
about: "Névjegy"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
hy:
discourse_table_builder:
modal:
help:
enter_key: "Մուտք"
edit:
modal:
cancel: "չեղարկել"
create: "Պահպանել"
reason: "Ո՞րն է խմբագրման պատճառը:"
spreadsheet:
show: "Ցուցադրել"
about: "Մասին"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
id:
discourse_table_builder:
modal:
help:
enter_key: "Enter"
edit:
modal:
cancel: "batal"
create: "Simpan"
reason: "mengapa Anda menyunting?"
spreadsheet:
show: "Tunjukkan"
about: "Tentang"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
it:
discourse_table_builder:
title: "Costruttore di tabelle"
composer:
button: "Inserisci tabella"
modal:
title: "Costruttore di tabelle"
create: "Costruisci tabella"
help:
title: "Utilizzo dell'editor di fogli di calcolo"
enter_key: "Invio"
tab_key: "Tab"
new_row: "alla fine di una riga per inserire una nuova riga."
new_col: "alla fine di una colonna per inserire una nuova colonna."
options: "Fai clic con il tasto destro sulle celle per accedere a più opzioni in un menu a discesa."
edit:
btn_edit: "Modifica tabella"
modal:
title: "Modifica tabella"
cancel: "annulla"
create: "Salva"
reason: "perché stai modificando?"
trigger_reason: "Aggiungi il motivo della modifica"
default_edit_reason: "Aggiorna tabella con l'editor di tabelle"
default_header:
col_1: "Colonna 1"
col_2: "Colonna 2"
col_3: "Colonna 3"
col_4: "Colonna 4"
spreadsheet:
no_records_found: "Nessun record trovato"
show: "Mostra"
entries: "voci"
about: "Informazioni"
prompts:
delete_selected_rows: "Vuoi davvero eliminare le righe selezionate?"
delete_selected_cols: "Vuoi davvero eliminare le colonne selezionate?"
will_destroy_merged_cells: "Questa azione eliminerà tutte le celle unite esistenti. Continuare?"
will_clear_search_results: "Questa azione eliminerà tutte le celle unite esistenti. Continuare?"
conflicts_with_merged_cells: "C'è un conflitto con un'altra cella unita"
invalid_merge_props: "Proprietà unite non valide"
cells_already_merged: "Cella già unita"
no_cells_selected: "Nessuna cella selezionata"
context_menu:
row:
before: "Inserisci una nuova riga prima"
after: "Inserisci una nuova riga dopo"
delete: "Elimina le righe selezionate"
col:
before: "Inserisci una nuova colonna prima"
after: "Inserisci una nuova colonna dopo"
delete: "Elimina le colonne selezionate"
rename: "Rinomina questa colonna"
order:
ascending: "Ordine crescente"
descending: "Ordine decrescente"
copy: "Copia..."
paste: "Incolla..."
save: "Salva come..."
theme_metadata:
description: "Aggiungi un pulsante all'editor per creare facilmente tabelle in markdown"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
ja:
discourse_table_builder:
title: "テーブル作成ツール"
composer:
button: "テーブルを挿入"
modal:
title: "テーブル作成ツール"
create: "テーブルを作成"
help:
title: "表計算シート作成ツールの使用"
enter_key: "Enter"
tab_key: "タブ"
new_row: "を行の末尾に使用して、新しい行を挿入します。"
new_col: "を列の末尾に使用して、新しい列を挿入します。"
options: "セルを右クリックすると、ドロップダウンメニューのその他のオプションにアクセスできます。"
edit:
btn_edit: "テーブルを編集"
modal:
title: "テーブルの編集"
cancel: "キャンセル"
create: "保存"
reason: "編集する理由は?"
trigger_reason: "編集理由を追加してください"
default_edit_reason: "テーブル作成ツールでテーブルを更新"
default_header:
col_1: "列 1"
col_2: "列 2"
col_3: "列 3"
col_4: "列 4"
spreadsheet:
no_records_found: "レコードが見つかりません"
show: "表示"
entries: "エントリー"
about: "情報"
prompts:
delete_selected_rows: "選択された行を削除してもよろしいですか?"
delete_selected_cols: "選択された列を削除してもよろしいですか?"
will_destroy_merged_cells: "この操作によって結合された既存の説がすべて破棄されます。よろしいですか?"
will_clear_search_results: "この操作によって結合された既存のセルがすべて破棄されます。よろしいですか?"
conflicts_with_merged_cells: "他の結合セルと競合しています"
invalid_merge_props: "結合されたプロパティが無効です"
cells_already_merged: "セルはすでに結合済みです"
no_cells_selected: "セルが選択されていません"
context_menu:
row:
before: "前に新しい行を挿入"
after: "後に新しい行を挿入"
delete: "選択行を削除"
col:
before: "前に新しい列を挿入"
after: "後に新しい列を挿入"
delete: "選択列を削除"
rename: "この列の名前を変更"
order:
ascending: "昇順で並べ替え"
descending: "降順で並べ替え"
copy: "コピー..."
paste: "貼り付け..."
save: "名前を付けて保存..."
theme_metadata:
description: "マークダウンで簡単にテーブルを作成するためのボタンを作成ツールに追加します"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
ko:
discourse_table_builder:
modal:
help:
enter_key: "시작하다"
edit:
modal:
cancel: "취소"
create: "저장하기"
reason: "왜 편집 중입니까?"
spreadsheet:
show: "보기"
about: "소개"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
lt:
discourse_table_builder:
modal:
help:
enter_key: "Įeiti"
edit:
modal:
cancel: "atšaukti"
create: "Išsaugoti"
reason: "kodėl jūs redaguojate?"
spreadsheet:
show: "Rodyti"
about: "Apie"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
lv:
discourse_table_builder:
modal:
help:
enter_key: "Ievadīt"
edit:
modal:
cancel: "atcelt"
create: "Saglabāt"
reason: "kāpēc jūs rediģējat?"
spreadsheet:
show: "Parādīt"
about: "Par"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
nb_NO:
discourse_table_builder:
modal:
help:
enter_key: "Angi"
edit:
modal:
cancel: "avbryt"
create: "Lagre"
reason: "hvorfor endrer du?"
spreadsheet:
show: "Vis"
about: "Om"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
nl:
discourse_table_builder:
title: "Tabelbouwer"
composer:
button: "Tabel invoegen"
modal:
title: "Tabelbouwer"
create: "Tabel bouwen"
help:
title: "Gebruik van de spreadsheeteditor"
enter_key: "Enter"
tab_key: "Tab"
new_row: "aan het einde van een rij om een nieuwe rij in te voegen."
new_col: "aan het einde van een kolom om een nieuwe kolom in te voegen."
options: "Rechtsklik op cellen voor meer opties in een vervolgkeuzemenu."
edit:
btn_edit: "Tabel bewerken"
modal:
title: "Tabel bewerken"
cancel: "annuleren"
create: "Opslaan"
reason: "waarom bewerk je?"
trigger_reason: "Reden voor bewerking toevoegen"
default_edit_reason: "Tabel bijwerken met tabeleditor"
default_header:
col_1: "Kolom 1"
col_2: "Kolom 2"
col_3: "Kolom 3"
col_4: "Kolom 4"
spreadsheet:
no_records_found: "Geen records gevonden"
show: "Weergeven"
entries: "vermeldingen"
about: "Over"
prompts:
delete_selected_rows: "Weet je zeker dat je de geselecteerde rijen wilt verwijderen?"
delete_selected_cols: "Weet je zeker dat je de geselecteerde kolommen wilt verwijderen?"
will_destroy_merged_cells: "Hierdoor worden alle bestaande samengevoegde cellen vernietigd. Weet je het zeker?"
will_clear_search_results: "Hierdoor worden alle bestaande samengevoegde cellen vernietigd. Weet je het zeker?"
conflicts_with_merged_cells: "Er is een conflict met een andere samengevoegde cel"
invalid_merge_props: "Ongeldige samengevoegde eigenschappen"
cells_already_merged: "Cel is al samengevoegd"
no_cells_selected: "Geen cellen geselecteerd"
context_menu:
row:
before: "Nieuwe rij invoegen voor"
after: "Nieuwe rij invoegen na"
delete: "Geselecteerde rijen verwijderen"
col:
before: "Nieuwe kolom invoegen voor"
after: "Nieuwe kolom invoegen na"
delete: "Geselecteerde kolommen verwijderen"
rename: "Deze kolom hernoemen"
order:
ascending: "Oplopend sorteren"
descending: "Aflopend sorteren"
copy: "Kopiëren..."
paste: "Plakken..."
save: "Opslaan als..."
theme_metadata:
description: "Voegt een knop toe aan de editor om eenvoudig tabellen te bouwen met markdown"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
pl_PL:
discourse_table_builder:
title: "Konstruktor tabeli"
composer:
button: "Wstaw tabelę"
modal:
title: "Konstruktor tabeli"
create: "Zbuduj tabelę"
help:
title: "Za pomocą edytora arkusza kalkulacyjnego"
enter_key: "Enter"
tab_key: "Tab"
new_row: "na końcu wiersza, aby wstawić nowy wiersz."
new_col: "na końcu kolumny, aby wstawić nową kolumnę."
options: "Kliknij komórki prawym przyciskiem myszy, aby uzyskać dostęp do większej liczby opcji w menu rozwijanym."
edit:
btn_edit: "Edytuj tabelę"
modal:
title: "Edytuj tabelę"
cancel: "anuluj"
create: "Zapisz"
reason: "dlaczego edytujesz?"
trigger_reason: "Dodaj powód edycji"
default_edit_reason: "Zaktualizuj tabelę za pomocą edytora tabel"
default_header:
col_1: "Kolumna 1"
col_2: "Kolumna 2"
col_3: "Kolumna 3"
col_4: "Kolumna 4"
spreadsheet:
no_records_found: "Nie znaleziono rekordów"
show: "Pokaż"
entries: "elementy"
about: "O stronie"
prompts:
delete_selected_rows: "Czy na pewno chcesz usunąć wybrane wiersze?"
delete_selected_cols: "Czy na pewno chcesz usunąć wybrane kolumny?"
will_destroy_merged_cells: "Ta czynność zniszczy wszystkie istniejące scalone komórki. Jesteś pewien?"
will_clear_search_results: "Ta czynność zniszczy wszystkie istniejące scalone komórki. Jesteś pewien?"
conflicts_with_merged_cells: "Występuje konflikt z inną scaloną komórką"
invalid_merge_props: "Nieprawidłowe scalone właściwości"
cells_already_merged: "Komórka już scalona"
no_cells_selected: "Nie wybrano komórek"
context_menu:
row:
before: "Wstaw nowy wiersz przed"
after: "Wstaw nowy wiersz po"
delete: "Usuń wybrane wiersze"
col:
before: "Wstaw nową kolumnę przed"
after: "Wstaw nową kolumnę po"
delete: "Usuń wybrane kolumny"
rename: "Zmień nazwę tej kolumny"
order:
ascending: "Kolejność rosnąca"
descending: "Kolejność malejąca"
copy: "Kopiuj..."
paste: "Wklej..."
save: "Zapisz jako..."
theme_metadata:
description: "Dodaje przycisk do edytora, aby łatwo tworzyć tabele w markdown."

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
pt:
discourse_table_builder:
modal:
help:
enter_key: "Entrar"
edit:
modal:
cancel: "cancelar"
create: "Guardar"
reason: "Porque está a editar?"
spreadsheet:
show: "Mostrar"
about: "Sobre"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
pt_BR:
discourse_table_builder:
title: "Compilador de tabela"
composer:
button: "Inserir tabela"
modal:
title: "Compilador de tabela"
create: "Compilar tabela"
help:
title: "Usando editor de planilha"
enter_key: "Enter"
tab_key: "Aba"
new_row: "no fim da linha para inserir uma nova linha."
new_col: "no fim da coluna para inserir uma nova coluna."
options: "Clique com o botão direito nas células para acessar mais opções no menu suspenso."
edit:
btn_edit: "Editar tabela"
modal:
title: "Editar tabela"
cancel: "cancelar"
create: "Salvar"
reason: "por que você está editando?"
trigger_reason: "Adicionar motivo para edição"
default_edit_reason: "Atualizar tabela com o editor de tabela"
default_header:
col_1: "Coluna 1"
col_2: "Coluna 2"
col_3: "Coluna 3"
col_4: "Coluna 4"
spreadsheet:
no_records_found: "Nenhum registro encontrado"
show: "Exibir"
entries: "entradas"
about: "Sobre"
prompts:
delete_selected_rows: "Tem certeza de que deseja excluir as linhas selecionadas?"
delete_selected_cols: "Tem certeza de que deseja excluir as colunas selecionadas?"
will_destroy_merged_cells: "Esta ação irá desfazer as células mescladas existentes. Tem certeza?"
will_clear_search_results: "Esta ação irá desfazer as células mescladas existentes. Tem certeza?"
conflicts_with_merged_cells: "Há um conflito com outra célula mesclada"
invalid_merge_props: "Propriedades mescladas inválidas"
cells_already_merged: "Células já mescladas"
no_cells_selected: "Nenhuma célula selecionada"
context_menu:
row:
before: "Inserir nova linha antes"
after: "Inserir nova linha depois"
delete: "Excluir linhas selecionadas"
col:
before: "Inserir nova coluna antes"
after: "Inserir nova coluna depois"
delete: "Excluir colunas selecionadas"
rename: "Renomear esta coluna"
order:
ascending: "Ordem crescente"
descending: "Ordem decrescente"
copy: "Copiar..."
paste: "Colar..."
save: "Salvar como..."
theme_metadata:
description: "Adiciona um botão ao compositor para construir tabelas facilmente no Markdown"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
ro:
discourse_table_builder:
edit:
modal:
cancel: "Anulează"
create: "Salvare"
reason: "de ce editezi?"
spreadsheet:
show: "Arată"
about: "Despre"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
ru:
discourse_table_builder:
title: "Конструктор таблиц"
composer:
button: "Вставить таблицу"
modal:
title: "Конструктор таблиц"
create: "Создать таблицу"
help:
title: "Использование редактора электронных таблиц"
enter_key: "Enter"
tab_key: "Tab"
new_row: "в конце строки — вставить новую строку."
new_col: "в конце столбца — вставить новый столбец."
options: "Клик правой кнопкой мыши на ячейке — дополнительные варианты во всплывающем меню."
edit:
btn_edit: "Редактировать таблицу"
modal:
title: "Редактирование таблицы"
cancel: "отмена"
create: "Сохранить"
reason: "По какой причине производится редактирование?"
trigger_reason: "Добавьте причину редактирования"
default_edit_reason: "Обновление таблицы с помощью редактора таблиц"
default_header:
col_1: "Столбец 1"
col_2: "Столбец 2"
col_3: "Столбец 3"
col_4: "Столбец 4"
spreadsheet:
no_records_found: "Записей не найдено"
show: "Показать"
entries: "записи"
about: "Информация"
prompts:
delete_selected_rows: "Действительно удалить выбранные строки?"
delete_selected_cols: "Действительно удалить выбранные столбцы?"
will_destroy_merged_cells: "Будут удалены все существующие объединенные ячейки. Выполнить действие?"
will_clear_search_results: "Будут удалены все существующие объединенные ячейки. Выполнить действие?"
conflicts_with_merged_cells: "Возник конфликт с другой объединенной ячейкой"
invalid_merge_props: "Недопустимые объединенные свойства"
cells_already_merged: "Ячейка уже объединена"
no_cells_selected: "Ячейки не выбраны"
context_menu:
row:
before: "Вставить новую строку выше"
after: "Вставить новую строку ниже"
delete: "Удалить выбранные строки"
col:
before: "Вставить новый столбец слева"
after: "Вставить новый столбец справа"
delete: "Удалить выбранные столбцы"
rename: "Переименовать столбец"
order:
ascending: "Упорядочить по возрастанию"
descending: "Упорядочить по убыванию"
copy: "Копировать..."
paste: "Вставить..."
save: "Сохранить как..."
theme_metadata:
description: "Добавление кнопки в окно редактора для быстрого создания таблиц"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
sk:
discourse_table_builder:
edit:
modal:
cancel: "zrušiť"
create: "Uložiť"
reason: "prečo upravujete?"
spreadsheet:
show: "Zobraziť"
about: "O stránke"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
sl:
discourse_table_builder:
modal:
help:
enter_key: "Enter"
edit:
modal:
cancel: "prekliči"
create: "Shrani"
reason: "zakaj spreminjate prispevek?"
spreadsheet:
show: "Prikaži"
about: "O nas"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
sq:
discourse_table_builder:
edit:
modal:
cancel: "anulo"
create: "Ruaj"
reason: "pse jeni duke e redaktuar?"
spreadsheet:
show: "Shfaq"
about: "Rreth"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
sr:
discourse_table_builder:
edit:
modal:
cancel: "otkaži"
create: "Sačuvaj"
reason: "zašto izmenjujete?"
spreadsheet:
show: "Pokaži"
about: "O nama"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
sv:
discourse_table_builder:
modal:
help:
enter_key: "Retur"
edit:
modal:
cancel: "avbryt"
create: "Spara"
reason: "varför redigerar du?"
spreadsheet:
show: "Visa"
about: "Om"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
sw:
discourse_table_builder:
edit:
modal:
cancel: "ghairi"
create: "Hifadhi"
reason: "kwa nini unahariri?"
spreadsheet:
show: "Onyesha"
about: "Kuhusu"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
te:
discourse_table_builder:
edit:
modal:
cancel: "రద్దు"
create: "భద్రపరుచు"
reason: "మీరెందుకు సవరిస్తున్నారు?"
spreadsheet:
show: "చూపు"
about: "గురించి"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
th:
discourse_table_builder:
modal:
help:
enter_key: "เอ็นเทอร์"
edit:
modal:
cancel: "ยกเลิก"
create: "บันทึก"
reason: "ทำไมคุณถึงแก้ไข"
spreadsheet:
show: "แสดง"
about: "เกี่ยวกับ"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
tr_TR:
discourse_table_builder:
title: "Tablo Oluşturucu"
composer:
button: "Tablo ekle"
modal:
title: "Tablo Oluşturucu"
create: "Tablo oluştur"
help:
title: "Elektronik Tablo Düzenleyiciyi kullanma"
enter_key: "Enter"
tab_key: "Sekme"
new_row: "yeni bir satır eklemek için bir satırın sonuna."
new_col: "yeni bir sütun eklemek için bir sütunun sonuna."
options: "Açılır menüde daha fazla seçeneğe erişmek için hücrelere sağ tıklayın."
edit:
btn_edit: "Tabloyu düzenle"
modal:
title: "Tabloyu düzenle"
cancel: "iptal et"
create: "Kaydet"
reason: "neden düzenleme yapıyorsunuz?"
trigger_reason: "Düzenleme nedeni ekleyin"
default_edit_reason: "Tablo Düzenleyiciyle Tabloyu güncelle"
default_header:
col_1: "Sütun 1"
col_2: "Sütun 2"
col_3: "Sütun 3"
col_4: "Sütun 4"
spreadsheet:
no_records_found: "Kayıt bulunamadı"
show: "Göster"
entries: "girdiler"
about: "Hakkında"
prompts:
delete_selected_rows: "Seçili satırları silmek istediğinizden emin misiniz?"
delete_selected_cols: "Seçili sütunları silmek istediğinizden emin misiniz?"
will_destroy_merged_cells: "Bu eylem mevcut birleştirilmiş hücreleri yok edecek. Emin misiniz?"
will_clear_search_results: "Bu eylem mevcut birleştirilmiş hücreleri yok edecek. Emin misiniz?"
conflicts_with_merged_cells: "Birleştirilmiş başka bir hücre ile çakışma var"
invalid_merge_props: "Geçersiz birleştirilmiş özellikler"
cells_already_merged: "Hücre zaten birleştirildi"
no_cells_selected: "Hücre seçilmedi"
context_menu:
row:
before: "Öncesine yeni bir satır ekle"
after: "Sonrasına yeni bir satır ekle"
delete: "Seçili satırları sil"
col:
before: "Öncesine yeni bir sütun ekle"
after: "Sonrasına yeni bir sütun ekle"
delete: "Seçili sütunları sil"
rename: "Bu sütunu yeniden adlandırın"
order:
ascending: "Artan sıralama"
descending: "Azalan sıralama"
copy: "Kopyala..."
paste: "Yapıştır..."
save: "Farklı kaydet..."
theme_metadata:
description: "Markdown'da tabloları kolayca oluşturmak için besteciye bir düğme ekler"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
uk:
discourse_table_builder:
modal:
help:
enter_key: "Enter"
edit:
modal:
cancel: "скасувати"
create: "Зберегти"
reason: "чому ви редагуєте допис?"
spreadsheet:
show: "Показати"
about: "Про"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
ur:
discourse_table_builder:
modal:
help:
enter_key: "اَینٹر"
edit:
modal:
cancel: "منسوخ"
create: "محفوظ کریں"
reason: "آپ ترمیم کیوں کر رہے ہیں؟"
spreadsheet:
show: "دکھائیں"
about: "بارے میں"

View File

@ -1,19 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
vi:
discourse_table_builder:
modal:
help:
enter_key: "Nhập"
edit:
modal:
cancel: "hủy"
create: "Lưu lại"
reason: "Tại sao bạn sửa"
spreadsheet:
show: "Hiển thị"
about: "Giới thiệu"

View File

@ -1,67 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
zh_CN:
discourse_table_builder:
title: "表生成器"
composer:
button: "插入表"
modal:
title: "表生成器"
create: "创建表"
help:
title: "使用电子表格编辑器"
enter_key: "Enter"
tab_key: "Tab"
new_row: "在行末尾插入新行。"
new_col: "在列末尾插入新列。"
options: "右键点击单元格可访问下拉菜单中的更多选项。"
edit:
btn_edit: "编辑表"
modal:
title: "编辑表"
cancel: "取消"
create: "保存"
reason: "为何进行这次编辑?"
trigger_reason: "添加编辑原因"
default_edit_reason: "使用表编辑器更新表"
default_header:
col_1: "第 1 列"
col_2: "第 2 列"
col_3: "第 3 列"
col_4: "第 4 列"
spreadsheet:
no_records_found: "找不到记录"
show: "显示"
entries: "个条目"
about: "关于"
prompts:
delete_selected_rows: "确定要删除所选行吗?"
delete_selected_cols: "确定要删除所选列吗?"
will_destroy_merged_cells: "此操作将破坏任何现有的合并单元格。确定吗?"
will_clear_search_results: "此操作将破坏任何现有的合并单元格。确定吗?"
conflicts_with_merged_cells: "与另一合并单元格存在冲突"
invalid_merge_props: "合并属性无效"
cells_already_merged: "单元格已合并"
no_cells_selected: "未选择单元格"
context_menu:
row:
before: "在前面插入新行"
after: "在后面插入新行"
delete: "删除所选行"
col:
before: "在前面插入新列"
after: "在后面插入新列"
delete: "删除所选列"
rename: "重命名此列"
order:
ascending: "按升序排序"
descending: "按降序排序"
copy: "复制…"
paste: "粘贴…"
save: "另存为…"
theme_metadata:
description: "向编辑器添加一个按钮,以便在 Markdown 中轻松构建表"

View File

@ -1,16 +0,0 @@
# WARNING: Never edit this file.
# It will be overwritten when translations are pulled from Crowdin.
#
# To work with us on translations, join this project:
# https://translate.discourse.org/
zh_TW:
discourse_table_builder:
edit:
modal:
cancel: "取消"
create: "保存"
reason: "你為什麼做編輯?"
spreadsheet:
show: "顯示"
about: "關於"

9739
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
{
"name": "discourse-table-builder",
"description": "Create and edit markdown tables using a spreadsheet editor.",
"version": "0.0.1",
"repository": "https://github.com/discourse/discourse-table-builder",
"author": "Keegan George",
"license": "MIT",
"scripts": {
"build": "bash ./build.bash"
},
"devDependencies": {
"eslint-config-discourse": "^3.4.0"
}
}

View File

@ -1,78 +0,0 @@
.btn-insert-table {
background: var(--tertiary);
color: var(--secondary);
.d-icon {
color: var(--secondary);
}
.discourse-no-touch & {
&:hover {
background-color: var(--tertiary-hover);
color: var(--secondary);
.d-icon {
color: var(--secondary);
}
}
}
}
.insert-table-modal {
display: flex;
flex-direction: column;
align-items: flex-start;
.d-modal__container,
.modal-inner-container {
--modal-max-width: $reply-area-max-width;
width: 100%;
height: 100%;
max-height: unset;
display: grid;
grid-template-rows: auto 1fr auto;
}
.modal-body {
padding: 0;
margin: 0;
}
.d-modal__footer,
.modal-footer {
display: flex;
align-items: center;
justify-content: space-between;
.secondary-actions {
display: flex;
align-items: center;
gap: 0.5rem;
.edit-reason {
display: flex;
align-items: center;
gap: 0.5rem;
}
.btn {
margin-right: 0;
}
input {
margin: 0;
}
}
.secondary-actions .tippy-content {
h4 {
color: var(--primary);
}
li {
margin-block: 0.25rem;
color: var(--primary-high);
}
}
}
}

View File

@ -1,41 +0,0 @@
.open-popup-link {
display: inline;
margin-inline: 0.25em;
}
.btn-edit-table {
-webkit-user-select: none;
-webkit-touch-callout: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.fullscreen-table-wrapper:hover .btn-edit-table {
opacity: 100%;
}
.mobile-view {
.btn-edit-table {
display: none;
z-index: 2;
position: absolute;
top: 1rem;
left: 1rem;
}
.fullscreen-table-wrapper {
position: relative;
&:hover {
table {
opacity: 0.5;
}
.btn-edit-table {
display: block;
z-index: 2;
}
}
}
}

View File

@ -1,272 +0,0 @@
:root {
--jexcel_header_color: var(--primary-high);
--jexcel_header_color_highlighted: var(--primary-high);
--jexcel_header_background: var(--primary-very-low);
--jexcel_header_background_highlighted: var(--primary-low);
--jexcel_content_color: var(--primary);
--jexcel_content_color_highlighted: var(--primary-high);
--jexcel_content_background: var(--secondary);
--jexcel_content_background_highlighted: var(--tertiary-very-low);
--jexcel_menu_background: var(--secondary);
--jexcel_menu_background_highlighted: var(--secondary-very-high);
--jexcel_menu_color: var(--primary-medium);
--jexcel_menu_color_highlighted: var(--primary);
--jexcel_border_color: var(--primary-low-mid);
--jexcel_border_color_highlighted: var(--tertiary-high);
--active_color: var(--primary-very-low);
--active-color: var(--active_color);
}
.jexcel {
border-bottom: 1px solid var(--jexcel_border_color);
border-right: transparent;
background-color: transparent;
}
table.jexcel > thead > tr > td {
border-top: 1px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-bottom: 1px solid #000;
background-color: #fff;
padding: 10px;
font-weight: bold;
}
table.jexcel > tbody > tr > td {
padding: 8px;
border-right: 1px solid transparent;
border-left: 1px solid transparent;
}
table.jexcel {
border-bottom: 1px solid var(--jexcel_border_color);
}
.jcontextmenu.jexcel_contextmenu hr {
border-color: var(--jexcel_border_color);
}
.jexcel_container .jcontextmenu > div a {
color: var(--jexcel_menu_color);
}
.jexcel_corner {
background-color: var(--tertiary);
}
.jexcel > tbody > tr > td,
.jexcel > thead > tr > td {
border-top: 1px solid var(--jexcel_border_color);
border-left: 1px solid var(--jexcel_border_color);
background-color: var(--jexcel_content_background);
color: var(--jexcel_content_color);
}
.jexcel > tbody > tr > td:first-child,
.jexcel > thead > tr > td {
background-color: var(--jexcel_header_background);
color: var(--jexcel_header_color);
}
.jexcel > thead > tr > td.selected,
.jexcel > tbody > tr.selected > td:first-child {
background-color: var(--jexcel_header_background_highlighted);
color: var(--jexcel_header_color_highlighted);
}
table.jexcel > tbody > tr > td:first-child {
background-color: var(--jexcel_header_background);
}
table.jexcel > tbody > tr.selected > td:first-child {
background-color: var(--jexcel_header_background_highlighted);
}
.jexcel > tbody > tr > td.jexcel_cursor a {
color: var(--active-color);
}
.jexcel_pagination > div > div {
color: var(--jexcel_header_color);
background: var(--jexcel_header_background);
border: 1px solid var(--jexcel_border_color);
}
.jexcel_page,
.jexcel_container input,
.jexcel_container select {
color: var(--jexcel_header_color);
background: var(--jexcel_header_background);
border: 1px solid var(--jexcel_border_color);
}
.jexcel_contextmenu.jcontextmenu {
border: 1px solid var(--jexcel_border_color);
background: var(--jexcel_menu_background);
color: var(--jexcel_menu_color);
box-shadow: 0 12px 12px rgba(0, 0, 0, 0.15);
}
.jcontextmenu > div a {
color: var(--jexcel_menu_color);
}
.jcontextmenu > div:not(.contextmenu-line):hover a {
color: var(--jexcel_menu_color_highlighted);
}
.jcontextmenu > div:not(.contextmenu-line):hover {
background: var(--jexcel_menu_background_highlighted);
}
.jexcel_dropdown .jdropdown-container,
.jexcel_dropdown .jdropdown-content {
background-color: var(--jexcel_content_background);
color: var(--jexcel_content_color);
}
.jexcel_dropdown .jdropdown-item {
color: var(--jexcel_content_color);
}
.jexcel_dropdown .jdropdown-item:hover,
.jexcel_dropdown .jdropdown-selected,
.jexcel_dropdown .jdropdown-cursor {
background-color: var(--jexcel_content_background_highlighted);
color: var(--jexcel_content_color_highlighted);
}
.jexcel .jcalendar-content {
background-color: var(--jexcel_header_background);
color: var(--jexcel_header_color);
}
.jexcel .jcalendar-content > table {
background-color: var(--jexcel_content_background);
color: var(--jexcel_content_color);
}
.jexcel .jcalendar-weekday {
background-color: var(--jexcel_content_background_highlighted);
color: var(--jexcel_content_color_highlighted);
}
.jexcel .jcalendar-sunday {
color: var(--jexcel_header_color);
}
.jexcel .jcalendar-selected {
background-color: var(--jexcel_content_background_highlighted);
color: var(--jexcel_content_color_highlighted);
}
.jexcel_toolbar i.jexcel_toolbar_item {
color: var(--jexcel_content_color);
}
.jexcel_toolbar i.jexcel_toolbar_item:hover {
background: var(--jexcel_content_background_highlighted);
color: var(--jexcel_content_color_highlighted);
}
.jexcel_toolbar {
background: var(--jexcel_header_background);
}
.jexcel_content::-webkit-scrollbar-track {
background: var(--jexcel_background_head);
}
.jexcel_content::-webkit-scrollbar-thumb {
background: var(--jexcel_background_head_highlighted);
}
.jexcel_border_main {
border: 1px solid #000;
border-color: var(--jexcel_border_color_highlighted);
}
.jexcel .highlight {
background-color: var(--jexcel_content_background_highlighted);
}
.jexcel .highlight-bottom {
border-bottom: 1.5px solid var(--jexcel_border_color_highlighted);
}
.jexcel .highlight-right {
border-right: 1.5px solid var(--jexcel_border_color_highlighted);
}
.jexcel .highlight-left {
border-left: 1.5px solid var(--jexcel_border_color_highlighted);
}
.jexcel .highlight-top {
border-top: 1.5px solid var(--jexcel_border_color_highlighted);
}
.jexcel .copying-top {
border-top-color: var(--jexcel_border_color_highlighted);
}
.jexcel .copying-right {
border-right-color: var(--jexcel_border_color_highlighted);
}
.jexcel .copying-left {
border-left-color: var(--jexcel_border_color_highlighted);
}
.jexcel .copying-bottom {
border-bottom-color: var(--jexcel_border_color_highlighted);
}
.jexcel_border_main,
.jexcel .highlight-top.highlight-left,
.jexcel .highlight-top,
.jexcel .highlight-left {
-webkit-box-shadow: unset;
box-shadow: unset;
}
table.jexcel > thead > tr > td {
border-top: 1px solid var(--jexcel_border_color);
border-right: 1px solid var(--jexcel_border_color);
border-bottom: 1px solid var(--jexcel_border_color);
background-color: var(--jexcel_header_background);
&:first-child {
border-left: 1px solid var(--jexcel_border_color);
}
}
table.jexcel > thead > tr > td.selected {
background-color: var(--jexcel_header_background_highlighted);
color: var(--jexcel_header_color_highlighted);
}
table.jexcel > tbody > tr > td {
border-right: 1px solid var(--jexcel_border_color);
&:first-child {
border-left: 1px solid var(--jexcel_border_color);
}
}
// Hides about item in context menu
.jcontextmenu > div:not(.contextmenu-line):last-child {
display: none;
}
.jexcel_container {
padding: 0.5em;
min-width: 100%;
.jexcel_content {
min-width: 100%;
padding: 0;
table.jexcel {
min-width: 100%;
}
}
}
.jexcel_container {
padding: 0;
}

View File

@ -1,699 +0,0 @@
:root {
--jexcel-border-color: #000;
}
.jexcel_container {
display: inline-block;
padding-right: 2px;
box-sizing: border-box;
overscroll-behavior: contain;
outline: none;
}
.jexcel_container.fullscreen {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 21;
}
.jexcel_container.fullscreen .jexcel_content {
overflow: auto;
width: 100%;
height: 100%;
background-color: #ffffff;
}
.jexcel_container.with-toolbar .jexcel > thead > tr > td {
top: 0;
}
.jexcel_container.fullscreen.with-toolbar {
height: calc(100% - 46px);
}
.jexcel_content {
display: inline-block;
box-sizing: border-box;
padding-right: 3px;
padding-bottom: 3px;
position: relative;
scrollbar-width: thin;
scrollbar-color: #666 transparent;
}
@supports (-moz-appearance: none) {
.jexcel_content {
padding-right: 10px;
}
}
.jexcel_content::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.jexcel_content::-webkit-scrollbar-track {
background: #eee;
}
.jexcel_content::-webkit-scrollbar-thumb {
background: #666;
}
.jexcel {
border-collapse: separate;
table-layout: fixed;
white-space: nowrap;
empty-cells: show;
border: 0px;
background-color: #fff;
width: 0;
border-top: 1px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
.jexcel > thead > tr > td {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
background-color: #f3f3f3;
padding: 2px;
cursor: pointer;
box-sizing: border-box;
overflow: hidden;
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 2;
}
.jexcel_container.with-toolbar .jexcel > thead > tr > td {
top: 42px;
}
.jexcel > thead > tr > td.dragging {
background-color: #fff;
opacity: 0.5;
}
.jexcel > thead > tr > td.selected {
background-color: #dcdcdc;
}
.jexcel > thead > tr > td.arrow-up {
background-repeat: no-repeat;
background-position: center right 5px;
background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M0 0h24v24H0V0z'/%3E%3Cpath d='M7 14l5-5 5 5H7z' fill='gray'/%3E%3C/svg%3E");
text-decoration: underline;
}
.jexcel > thead > tr > td.arrow-down {
background-repeat: no-repeat;
background-position: center right 5px;
background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M0 0h24v24H0V0z'/%3E%3Cpath d='M7 10l5 5 5-5H7z' fill='gray'/%3E%3C/svg%3E");
text-decoration: underline;
}
.jexcel > tbody > tr > td:first-child {
position: relative;
background-color: #f3f3f3;
text-align: center;
}
.jexcel > tbody.resizable > tr > td:first-child::before {
content: "\00a0";
width: 100%;
height: 3px;
position: absolute;
bottom: 0px;
left: 0px;
cursor: row-resize;
}
.jexcel > tbody.draggable > tr > td:first-child::after {
content: "\00a0";
width: 3px;
height: 100%;
position: absolute;
top: 0px;
right: 0px;
cursor: move;
}
.jexcel > tbody > tr.dragging > td {
background-color: #eee;
opacity: 0.5;
}
.jexcel > tbody > tr > td {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
padding: 4px;
white-space: nowrap;
box-sizing: border-box;
line-height: 1em;
}
.jexcel_overflow > tbody > tr > td {
overflow: hidden;
}
.jexcel > tbody > tr > td:last-child {
overflow: hidden;
}
.jexcel > tbody > tr > td > img {
display: inline-block;
max-width: 100px;
}
.jexcel > tbody > tr > td.readonly {
color: rgba(0, 0, 0, 0.3);
}
.jexcel > tbody > tr.selected > td:first-child {
background-color: #dcdcdc;
}
.jexcel > tbody > tr > td > select,
.jexcel > tbody > tr > td > input,
.jexcel > tbody > tr > td > textarea {
border: 0px;
border-radius: 0px;
outline: 0px;
width: 100%;
margin: 0px;
padding: 0px;
padding-right: 2px;
background-color: transparent;
box-sizing: border-box;
}
.jexcel > tbody > tr > td > textarea {
resize: none;
padding-top: 6px !important;
}
.jexcel > tbody > tr > td > input[type="checkbox"] {
width: 12px;
margin-top: 2px;
}
.jexcel > tbody > tr > td > input[type="radio"] {
width: 12px;
margin-top: 2px;
}
.jexcel > tbody > tr > td > select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-repeat: no-repeat;
background-position-x: 100%;
background-position-y: 40%;
background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSdibGFjaycgaGVpZ2h0PScyNCcgdmlld0JveD0nMCAwIDI0IDI0JyB3aWR0aD0nMjQnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTTcgMTBsNSA1IDUtNXonLz48cGF0aCBkPSdNMCAwaDI0djI0SDB6JyBmaWxsPSdub25lJy8+PC9zdmc+);
}
.jexcel > tbody > tr > td.jexcel_dropdown {
background-repeat: no-repeat;
background-position: top 50% right 5px;
background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M0 0h24v24H0V0z'/%3E%3Cpath d='M7 10l5 5 5-5H7z' fill='lightgray'/%3E%3C/svg%3E");
text-overflow: ellipsis;
overflow-x: hidden;
}
.jexcel > tbody > tr > td.jexcel_dropdown.jexcel_comments {
background: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M0 0h24v24H0V0z'/%3E%3Cpath d='M7 10l5 5 5-5H7z' fill='lightgray'/%3E%3C/svg%3E")
top 50% right 5px no-repeat,
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFuGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTAxLTMxVDE4OjU1OjA4WiIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0wMS0zMVQxODo1NTowOFoiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTAxLTMxVDE4OjU1OjA4WiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDphMTlhZDJmOC1kMDI2LTI1NDItODhjOS1iZTRkYjkyMmQ0MmQiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpkOGI5NDUyMS00ZjEwLWQ5NDktYjUwNC0wZmU1N2I3Nzk1MDEiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDplMzdjYmE1ZS1hYTMwLWNkNDUtYTAyNS1lOWYxZjk2MzUzOGUiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDplMzdjYmE1ZS1hYTMwLWNkNDUtYTAyNS1lOWYxZjk2MzUzOGUiIHN0RXZ0OndoZW49IjIwMTktMDEtMzFUMTg6NTU6MDhaIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmExOWFkMmY4LWQwMjYtMjU0Mi04OGM5LWJlNGRiOTIyZDQyZCIgc3RFdnQ6d2hlbj0iMjAxOS0wMS0zMVQxODo1NTowOFoiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4En6MDAAAAX0lEQVQYlX3KOw6AIBBAwS32RpJADXfx0pTET+ERZJ8F8RODFtONsG0QAoh0CSDM82dqodaBdQXnfoLZQM7gPai+wjNNE8R4pTuAYNZSKZASqL7CMy0LxNgJp30fKYUDi3+vIqb/+rUAAAAASUVORK5CYII=")
top right no-repeat;
}
.jexcel > tbody > tr > td > .color {
width: 90%;
height: 10px;
margin: auto;
}
.jexcel > tbody > tr > td > a {
text-decoration: underline;
}
.jexcel > tbody > tr > td.highlight > a {
color: blue;
cursor: pointer;
}
.jexcel > tfoot > tr > td {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
background-color: #f3f3f3;
padding: 2px;
cursor: pointer;
box-sizing: border-box;
overflow: hidden;
}
.jexcel .highlight {
background-color: rgba(0, 0, 0, 0.05);
}
.jexcel .highlight-top {
border-top: 1px solid #000; /* var(--jexcel-border-color);*/
box-shadow: 0px -1px #ccc;
}
.jexcel .highlight-left {
border-left: 1px solid #000; /* var(--jexcel-border-color);*/
box-shadow: -1px 0px #ccc;
}
.jexcel .highlight-right {
border-right: 1px solid #000; /* var(--jexcel-border-color);*/
}
.jexcel .highlight-bottom {
border-bottom: 1px solid #000; /* var(--jexcel-border-color);*/
}
.jexcel .highlight-top.highlight-left {
box-shadow: -1px -1px #ccc;
-webkit-box-shadow: -1px -1px #ccc;
-moz-box-shadow: -1px -1px #ccc;
}
.jexcel .highlight-selected {
background-color: rgba(0, 0, 0, 0);
}
.jexcel .selection {
background-color: rgba(0, 0, 0, 0.05);
}
.jexcel .selection-left {
border-left: 1px dotted #000;
}
.jexcel .selection-right {
border-right: 1px dotted #000;
}
.jexcel .selection-top {
border-top: 1px dotted #000;
}
.jexcel .selection-bottom {
border-bottom: 1px dotted #000;
}
.jexcel_corner {
position: absolute;
background-color: rgb(0, 0, 0);
height: 1px;
width: 1px;
border: 1px solid rgb(255, 255, 255);
top: -2000px;
left: -2000px;
cursor: crosshair;
box-sizing: initial;
z-index: 20;
padding: 2px;
}
.jexcel .editor {
outline: 0px solid transparent;
overflow: visible;
white-space: nowrap;
text-align: left;
padding: 0px;
box-sizing: border-box;
overflow: visible !important;
}
.jexcel .editor > input {
padding-left: 4px;
}
.jexcel .editor .jupload {
position: fixed;
top: 100%;
z-index: 40;
user-select: none;
-webkit-font-smoothing: antialiased;
font-size: 0.875rem;
letter-spacing: 0.2px;
-webkit-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
padding: 10px;
background-color: #fff;
width: 300px;
min-height: 225px;
margin-top: 2px;
}
.jexcel .editor .jupload img {
width: 100%;
height: auto;
}
.jexcel .editor .jexcel_richtext {
position: fixed;
top: 100%;
z-index: 40;
user-select: none;
-webkit-font-smoothing: antialiased;
font-size: 0.875rem;
letter-spacing: 0.2px;
-webkit-box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
padding: 10px;
background-color: #fff;
min-width: 280px;
max-width: 310px;
margin-top: 2px;
text-align: left;
}
.jexcel .editor .jclose:after {
position: absolute;
top: 0;
right: 0;
margin: 10px;
content: "close";
font-family: "Material icons";
font-size: 24px;
width: 24px;
height: 24px;
line-height: 24px;
cursor: pointer;
text-shadow: 0px 0px 5px #fff;
}
.jexcel,
.jexcel td,
.jexcel_corner {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
user-drag: none;
}
.jexcel_textarea {
position: absolute;
top: -999px;
left: -999px;
width: 1px;
height: 1px;
}
.jexcel .dragline {
position: absolute;
}
.jexcel .dragline div {
position: relative;
top: -6px;
height: 5px;
width: 22px;
}
.jexcel .dragline div:hover {
cursor: move;
}
.jexcel .onDrag {
background-color: rgba(0, 0, 0, 0.6);
}
.jexcel .error {
border: 1px solid red;
}
.jexcel thead td.resizing {
border-right-style: dotted !important;
border-right-color: red !important;
}
.jexcel tbody tr.resizing > td {
border-bottom-style: dotted !important;
border-bottom-color: red !important;
}
.jexcel tbody td.resizing {
border-right-style: dotted !important;
border-right-color: red !important;
}
.jexcel .jdropdown-header {
border: 0px !important;
outline: none !important;
width: 100% !important;
height: 100% !important;
padding: 0px !important;
padding-left: 8px !important;
}
.jexcel .jdropdown-container {
margin-top: 1px;
}
.jexcel .jdropdown-container-header {
padding: 0px;
margin: 0px;
height: inherit;
}
.jexcel .jdropdown-picker {
border: 0px !important;
padding: 0px !important;
width: inherit;
height: inherit;
}
.jexcel .jexcel_comments {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFuGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTAxLTMxVDE4OjU1OjA4WiIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0wMS0zMVQxODo1NTowOFoiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTAxLTMxVDE4OjU1OjA4WiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDphMTlhZDJmOC1kMDI2LTI1NDItODhjOS1iZTRkYjkyMmQ0MmQiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpkOGI5NDUyMS00ZjEwLWQ5NDktYjUwNC0wZmU1N2I3Nzk1MDEiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDplMzdjYmE1ZS1hYTMwLWNkNDUtYTAyNS1lOWYxZjk2MzUzOGUiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDplMzdjYmE1ZS1hYTMwLWNkNDUtYTAyNS1lOWYxZjk2MzUzOGUiIHN0RXZ0OndoZW49IjIwMTktMDEtMzFUMTg6NTU6MDhaIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmExOWFkMmY4LWQwMjYtMjU0Mi04OGM5LWJlNGRiOTIyZDQyZCIgc3RFdnQ6d2hlbj0iMjAxOS0wMS0zMVQxODo1NTowOFoiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4En6MDAAAAX0lEQVQYlX3KOw6AIBBAwS32RpJADXfx0pTET+ERZJ8F8RODFtONsG0QAoh0CSDM82dqodaBdQXnfoLZQM7gPai+wjNNE8R4pTuAYNZSKZASqL7CMy0LxNgJp30fKYUDi3+vIqb/+rUAAAAASUVORK5CYII=");
background-repeat: no-repeat;
background-position: top right;
}
.jexcel .sp-replacer {
margin: 2px;
border: 0px;
}
.jexcel > thead > tr.jexcel_filter > td > input {
border: 0px;
width: 100%;
outline: none;
}
.jexcel_about {
float: right;
font-size: 0.7em;
padding: 2px;
text-transform: uppercase;
letter-spacing: 1px;
display: none;
}
.jexcel_about a {
color: #ccc;
text-decoration: none;
}
.jexcel_about img {
display: none;
}
.jexcel_filter {
display: flex;
justify-content: space-between;
margin-bottom: 4px;
}
.jexcel_filter > div {
padding: 8px;
align-items: center;
}
.jexcel_pagination {
display: flex;
justify-content: space-between;
align-items: center;
}
.jexcel_pagination > div {
display: flex;
padding: 10px;
}
.jexcel_pagination > div:last-child {
padding-right: 10px;
padding-top: 10px;
}
.jexcel_pagination > div > div {
text-align: center;
width: 36px;
height: 36px;
line-height: 34px;
border: 1px solid #ccc;
box-sizing: border-box;
margin-left: 2px;
cursor: pointer;
}
.jexcel_page {
font-size: 0.8em;
}
.jexcel_page_selected {
font-weight: bold;
background-color: #f3f3f3;
}
.jexcel_toolbar {
display: flex;
background-color: #f3f3f3;
border: 1px solid #ccc;
padding: 4px;
margin: 0px 2px 4px 1px;
position: sticky;
top: 0px;
z-index: 21;
}
.jexcel_toolbar:empty {
display: none;
}
.jexcel_toolbar i.jexcel_toolbar_item {
width: 24px;
height: 24px;
padding: 4px;
cursor: pointer;
display: inline-block;
}
.jexcel_toolbar i.jexcel_toolbar_item:hover {
background-color: #ddd;
}
.jexcel_toolbar select.jexcel_toolbar_item {
margin-left: 2px;
margin-right: 2px;
display: inline-block;
border: 0px;
background-color: transparent;
padding-right: 10px;
}
.jexcel .dragging-left {
background-repeat: no-repeat;
background-position: top 50% left 0px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M14 7l-5 5 5 5V7z'/%3E%3Cpath fill='none' d='M24 0v24H0V0h24z'/%3E%3C/svg%3E");
}
.jexcel .dragging-right {
background-repeat: no-repeat;
background-position: top 50% right 0px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 17l5-5-5-5v10z'/%3E%3Cpath fill='none' d='M0 24V0h24v24H0z'/%3E%3C/svg%3E");
}
.jexcel_tabs .jexcel_tab {
display: none;
}
.jexcel_tabs .jexcel_tab_link {
display: inline-block;
padding: 10px;
padding-left: 20px;
padding-right: 20px;
margin-right: 5px;
margin-bottom: 5px;
background-color: #f3f3f3;
cursor: pointer;
}
.jexcel_tabs .jexcel_tab_link.selected {
background-color: #ddd;
}
.jexcel_hidden_index > tbody > tr > td:first-child,
.jexcel_hidden_index > thead > tr > td:first-child,
.jexcel_hidden_index > tfoot > tr > td:first-child,
.jexcel_hidden_index > colgroup > col:first-child {
display: none;
}
.jexcel .jrating {
display: inline-flex;
}
.jexcel .jrating > div {
zoom: 0.55;
}
.jexcel .copying-top {
border-top: 1px dashed #000;
}
.jexcel .copying-left {
border-left: 1px dashed #000;
}
.jexcel .copying-right {
border-right: 1px dashed #000;
}
.jexcel .copying-bottom {
border-bottom: 1px dashed #000;
}
.jexcel .jexcel_column_filter {
background-repeat: no-repeat;
background-position: top 50% right 5px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='gray' width='18px' height='18px'%3E%3Cpath d='M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
text-overflow: ellipsis;
overflow: hidden;
padding: 0px;
padding-left: 6px;
padding-right: 20px;
}
.jexcel thead .jexcel_freezed,
.jexcel tfoot .jexcel_freezed {
left: 0px;
z-index: 3 !important;
box-shadow: 2px 0px 2px 0.2px #ccc !important;
-webkit-box-shadow: 2px 0px 2px 0.2px #ccc !important;
-moz-box-shadow: 2px 0px 2px 0.2px #ccc !important;
}
.jexcel tbody .jexcel_freezed {
position: relative;
background-color: #fff;
box-shadow: 1px 1px 1px 1px #ccc !important;
-webkit-box-shadow: 2px 4px 4px 0.1px #ccc !important;
-moz-box-shadow: 2px 4px 4px 0.1px #ccc !important;
}
.red {
color: red;
}
.jexcel > tbody > tr > td.readonly > input[type="checkbox"],
.jexcel > tbody > tr > td.readonly > input[type="radio"] {
pointer-events: none;
opacity: 0.5;
}

3038
scss/vendor/jsuites.scss vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +0,0 @@
# frozen_string_literal: true
module PageObjects
module Modals
class InsertTable < PageObjects::Modals::Base
MODAL_SELECTOR = ".insert-table-modal"
SPREADSHEET_TABLE_SELECTOR = "#{MODAL_SELECTOR} .jexcel"
def click_insert_table
find("#{MODAL_SELECTOR} .btn-insert-table").click
end
def cancel
find("#{MODAL_SELECTOR} .d-modal-cancel").click
end
def click_edit_reason
find("#{MODAL_SELECTOR} .btn-edit-reason").click
end
def type_edit_reason(text)
find("#{MODAL_SELECTOR} .edit-reason input").send_keys(text)
end
def find_cell(row, col)
find(
"#{SPREADSHEET_TABLE_SELECTOR} tbody tr[data-y='#{row}'] td[data-x='#{col}']"
)
end
def select_cell(row, col)
find_cell(row, col).double_click
end
def type_in_cell(row, col, text)
select_cell(row, col)
cell = find_cell(row, col).find("textarea")
cell.send_keys(text, :return)
end
def has_content_in_cell?(row, col, content)
find_cell(row, col).text == content
end
end
end
end

View File

@ -1,157 +0,0 @@
# frozen_string_literal: true
require_relative "page_objects/modals/insert_table"
RSpec.describe "Table Builder", system: true do
fab!(:user) { Fabricate(:user) }
let!(:theme_component) { upload_theme_component }
let(:composer) { PageObjects::Components::Composer.new }
let(:insert_table_modal) { PageObjects::Modals::InsertTable.new }
let(:sample_table_md) {}
fab!(:topic) { Fabricate(:topic, user: user) }
fab!(:post1) { create_post(user: user, topic: topic, raw: <<~RAW) }
|Make | Model | Year|
|-------| ------- | ----|
|Toyota | Supra | 1998|
|Nissan | Skyline | 1999|
|Honda | S2000 | 2001|
RAW
let(:topic_page) { PageObjects::Pages::Topic.new }
before { sign_in(user) }
def normalize_value(content)
content.strip.gsub(/\s+/, " ").gsub(/\r\n/, "\n")
end
context "when creating a new table" do
it "should add table items created in spreadsheet to composer input" do
visit("/latest")
page.find("#create-topic").click
page.find(".toolbar-popup-menu-options").click
page.find(".select-kit-row[data-name='Insert Table']").click
insert_table_modal.type_in_cell(0, 0, "Item 1")
insert_table_modal.type_in_cell(0, 1, "Item 2")
insert_table_modal.type_in_cell(0, 2, "Item 3")
insert_table_modal.type_in_cell(0, 3, "Item 4")
insert_table_modal.click_insert_table
created_table = <<~TABLE
|Column 1 | Column 2 | Column 3 | Column 4|
|--- | --- | --- | ---|
|Item 1 | Item 2 | Item 3 | Item 4|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
TABLE
expect(normalize_value(composer.composer_input.value)).to eq(
normalize_value(created_table)
)
end
context "when cancelling table creation" do
it "should close the modal if there are no changes made" do
visit("/latest")
page.find("#create-topic").click
page.find(".toolbar-popup-menu-options").click
page.find(".select-kit-row[data-name='Insert Table']").click
insert_table_modal.cancel
expect(page).to have_no_css(".insert-table-modal")
end
it "should show a warning popup if there are unsaved changes" do
visit("/latest")
page.find("#create-topic").click
page.find(".toolbar-popup-menu-options").click
page.find(".select-kit-row[data-name='Insert Table']").click
insert_table_modal.type_in_cell(0, 0, "Item 1")
insert_table_modal.cancel
expect(page).to have_css(".dialog-container .dialog-content")
end
end
end
context "when editing a table" do
it "should prefill the spreadsheet with the markdown table items from the post" do
topic_page.visit_topic(topic)
topic_page.find(".btn-edit-table", visible: :all).click
expect(page).to have_selector(".insert-table-modal")
expected_table_content = [
%w[Toyota Supra 1998],
%w[Nissan Skyline 1999],
%w[Honda S2000 2001]
]
expected_table_content.each_with_index do |row, row_index|
row.each_with_index do |content, col_index|
expect(insert_table_modal).to have_content_in_cell(
row_index,
col_index,
content
)
end
end
end
it "should update the post with the new table content" do
topic_page.visit_topic(topic)
topic_page.find(".btn-edit-table", visible: :all).click
expect(page).to have_selector(".insert-table-modal")
insert_table_modal.type_in_cell(1, 1, " GTR")
insert_table_modal.click_insert_table
updated_post = <<~RAW
|Make | Model | Year|
|-------| ------- | ----|
|Toyota | Supra | 1998|
|Nissan | Skyline | 1999|
|Honda | S2000 | 2001|
RAW
expect(normalize_value(post1.reload.raw)).to eq(
normalize_value(updated_post)
)
end
context "when adding an edit reason" do
it "should add the edit reason to the edit history" do
edit_reason = "Updated Nissan model"
topic_page.visit_topic(topic)
topic_page.find(".btn-edit-table", visible: :all).click
expect(page).to have_selector(".insert-table-modal")
insert_table_modal.type_in_cell(1, 1, " GTR")
insert_table_modal.click_edit_reason
insert_table_modal.type_edit_reason(edit_reason)
insert_table_modal.click_insert_table
wait_for { post1.reload.edit_reason == edit_reason }
expect(post1.reload.edit_reason).to eq(edit_reason)
end
end
context "when cancelling table creation" do
it "should close the modal if there are no changes made" do
topic_page.visit_topic(topic)
topic_page.find(".btn-edit-table", visible: :all).click
expect(page).to have_selector(".insert-table-modal")
insert_table_modal.cancel
expect(page).to have_no_css(".insert-table-modal")
end
it "should show a warning popup if there are unsaved changes" do
topic_page.visit_topic(topic)
topic_page.find(".btn-edit-table", visible: :all).click
expect(page).to have_selector(".insert-table-modal")
insert_table_modal.type_in_cell(1, 1, " GTR")
insert_table_modal.cancel
expect(page).to have_css(".dialog-container .dialog-content")
end
end
end
end

View File

@ -1,43 +0,0 @@
import I18n from "discourse-i18n";
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
import selectKit from "discourse/tests/helpers/select-kit-helper";
acceptance("Table Builder", function (needs) {
needs.user();
needs.hooks.beforeEach(() => clearPopupMenuOptionsCallback());
test("Can see table builder button when creating a topic", async function (assert) {
await visit("/");
await click("#create-topic");
await click(".d-editor-button-bar .options");
await selectKit(".toolbar-popup-menu-options").expand();
assert
.dom(
`.select-kit-row[data-name='${I18n.t(
themePrefix("discourse_table_builder.composer.button")
)}']`
)
.exists("it shows the builder button");
});
test("Can see table builder button when editing post", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#post_1 .show-more-actions");
await click("#post_1 .edit");
assert.ok(exists("#reply-control"));
await click(".d-editor-button-bar .options");
await selectKit(".toolbar-popup-menu-options").expand();
assert
.dom(
`.select-kit-row[data-name='${I18n.t(
themePrefix("discourse_table_builder.composer.button")
)}']`
)
.exists("it shows the builder button");
});
});

View File

@ -1,3 +0,0 @@
export const mdTable = `|Make | Model | Year|\r\n|--- | --- | ---|\r\n|Toyota | Supra | 1998|\r\n|Nissan | Skyline | 1999|\r\n|Honda | S2000 | 2001|\r\n`;
export const mdTableSpecialChars = `|Make | Model | Price|\r\n|--- | --- | ---|\r\n|Toyota | Supra | $50,000|\r\n| | Celica | $20,000|\r\n|Nissan | GTR | $80,000|\r\n`;
export const mdTableNonUniqueHeadings = `|col1 | col2 | col1|\r\n|--- | --- | ---|\r\n|Col A | Col B | Col C|\r\n`;

View File

@ -1,165 +0,0 @@
import { discourseModule } from "discourse/tests/helpers/qunit-helpers";
import { test } from "qunit";
import {
mdTable,
mdTableNonUniqueHeadings,
mdTableSpecialChars,
} from "../../fixtures/md-table";
import {
arrayToTable,
findTableRegex,
} from "../../../discourse-table-builder/lib/utilities";
discourseModule("Unit | Utilities", function () {
test("arrayToTable", function (assert) {
const tableData = [
{
col0: "Toyota",
col1: "Supra",
col2: "1998",
},
{
col0: "Nissan",
col1: "Skyline",
col2: "1999",
},
{
col0: "Honda",
col1: "S2000",
col2: "2001",
},
];
assert.strictEqual(
arrayToTable(tableData, ["Make", "Model", "Year"]),
mdTable,
"it creates a markdown table from an array of objects (with headers as keys)"
);
const specialCharsTableData = [
{
col0: "Toyota",
col1: "Supra",
col2: "$50,000",
},
{
col0: "",
col1: "Celica",
col2: "$20,000",
},
{
col0: "Nissan",
col1: "GTR",
col2: "$80,000",
},
];
assert.strictEqual(
arrayToTable(specialCharsTableData, ["Make", "Model", "Price"]),
mdTableSpecialChars,
"it creates a markdown table with special characters in correct alignment"
);
const nonUniqueColumns = ["col1", "col2", "col1"];
assert.strictEqual(
arrayToTable(
[{ col0: "Col A", col1: "Col B", col2: "Col C" }],
nonUniqueColumns
),
mdTableNonUniqueHeadings,
"it does not suppress a column if heading is the same as another column"
);
});
test("arrayToTable with custom column prefix", function (assert) {
const tableData = [
{
A0: "hey",
A1: "you",
},
{
A0: "over",
A1: "there",
},
];
assert.strictEqual(
arrayToTable(tableData, ["Col 1", "Col 2"], "A"),
`|Col 1 | Col 2|\r\n|--- | ---|\r\n|hey | you|\r\n|over | there|\r\n`,
"it works"
);
});
test("arrayToTable returns valid table with multiline cell data", function (assert) {
const tableData = [
{
col0: "Jane\nDoe",
col1: "Teri",
},
{
col0: "Finch",
col1: "Sami",
},
];
assert.strictEqual(
arrayToTable(tableData, ["Col 1", "Col 2"]),
`|Col 1 | Col 2|\r\n|--- | ---|\r\n|Jane Doe | Teri|\r\n|Finch | Sami|\r\n`,
"it creates a valid table"
);
});
test("findTableRegex", function (assert) {
const oneTable = `|Make|Model|Year|\r\n|--- | --- | ---|\r\n|Toyota|Supra|1998|`;
assert.strictEqual(
oneTable.match(findTableRegex()).length,
1,
"finds one table in markdown"
);
const threeTables = `## Heading
|Table1 | PP Port | Device | DP | Medium|
|--- | --- | --- | --- | ---|
| Something | (1+2) | Dude | Mate | Bro |
|Table2 | PP Port | Device | DP | Medium|
|--- | --- | --- | --- | ---|
| Something | (1+2) | Dude | Mate | Bro |
| | (1+2) | Dude | Mate | Bro |
| | (1+2) | Dude | Mate | Bro |
|Table3 | PP Port | Device | DP |
|--- | --- | --- | --- |
| Something | (1+2) | Dude | Sound |
| | (1+2) | Dude | OW |
| | (1+2) | Dude | OI |
Random extras
`;
assert.strictEqual(
threeTables.match(findTableRegex()).length,
3,
"finds three tables in markdown"
);
const ignoreUploads = `
:information_source: Something
[details=Example of a cross-connect in Equinix]
![image|603x500, 100%](upload://fURYa9mt00rXZITdYhhyeHFJE8J.png)
[/details]
|Table1 | PP Port | Device | DP | Medium|
|--- | --- | --- | --- | ---|
| Something | (1+2) | Dude | Mate | Bro |
`;
assert.strictEqual(
ignoreUploads.match(findTableRegex()).length,
1,
"finds on table, ignoring upload markup"
);
});
});

View File

@ -1,5 +0,0 @@
# Configuration file for discourse-translator-bot
files:
- source_path: locales/en.yml
destination_path: translations.yml

3077
yarn.lock

File diff suppressed because it is too large Load Diff