Skip to content

Commit

Permalink
Remove illegal words from translations root (#7045)
Browse files Browse the repository at this point in the history
Fixes #7033
  • Loading branch information
rijkvanzanten committed Jul 28, 2021
1 parent 81e19fa commit d945489
Show file tree
Hide file tree
Showing 32 changed files with 70 additions and 48 deletions.
2 changes: 1 addition & 1 deletion app/src/components/v-upload/v-upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{{ t('cancel') }}
</v-button>
<v-button :loading="urlLoading" :disabled="isValidURL === false" @click="importFromURL">
{{ t('import') }}
{{ t('import_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
2 changes: 1 addition & 1 deletion app/src/interfaces/file/file.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
{{ t('cancel') }}
</v-button>
<v-button :loading="urlLoading" :disabled="isValidURL === false" @click="importFromURL">
{{ t('import') }}
{{ t('import_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
2 changes: 1 addition & 1 deletion app/src/interfaces/list/options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default defineComponent({
schema: null,
},
{
name: t('interface'),
name: t('interface_label'),
field: 'interface',
type: 'string',
meta: {
Expand Down
34 changes: 28 additions & 6 deletions app/src/lang/translations/en-US.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## Be aware:
# Due to the way this is imported, JavaScript reserved words, including "delete", "private",
# "void", etc are stripped out. See
# https://github.com/rollup/plugins/blob/8748b8cd3bbab3c5ac6190556930219f19060e63/packages/pluginutils/src/makeLegalIdentifier.ts#L4
# and
# https://github.com/rollup/plugins/blob/8748b8cd3bbab3c5ac6190556930219f19060e63/packages/yaml/src/index.js#L45
#
# Illegal words:
# 'break', 'case', 'class', 'catch', 'const', 'continue', 'debugger', 'default', 'delete', 'do',
# 'else', 'export', 'extends', 'finally', 'for', 'function', 'if', 'import', 'in', 'instanceof',
# 'let', 'new', 'return', 'super', 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void',
# 'while', 'with', 'yield', 'enum', 'await', 'implements', 'package', 'protected', 'static',
# 'interface', 'private', 'public', 'arguments', 'Infinity', 'NaN', 'undefined', 'null', 'true',
# 'false', 'eval', 'uneval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'decodeURI',
# 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', 'unescape', 'Object',
# 'Function', 'Boolean', 'Symbol', 'Error', 'EvalError', 'InternalError', 'RangeError',
# 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'Number', 'Math', 'Date', 'String',
# 'RegExp', 'Array', 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array',
# 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array', 'Map', 'Set', 'WeakMap', 'WeakSet',
# 'SIMD', 'ArrayBuffer', 'DataView', 'JSON', 'Promise', 'Generator', 'GeneratorFunction', 'Reflect',
# 'Proxy', 'Intl'

edit_field: Edit Field
conditions: Conditions
item_revision: Item Revision
Expand Down Expand Up @@ -50,7 +72,7 @@ delete_bookmark_copy: >-
logoutReason:
SIGN_OUT: Signed out
SESSION_EXPIRED: Session expired
public: Public
public_label: Public
public_description: Controls what API data is available without authenticating.
not_allowed: Not Allowed
directus_version: Directus Version
Expand Down Expand Up @@ -264,7 +286,7 @@ move_to_folder: Move to Folder
move: Move
system: System
add_field_related: Add Field to Related Collection
interface: Interface
interface_label: Interface
today: Today
yesterday: Yesterday
delete_comment: Delete Comment
Expand Down Expand Up @@ -294,7 +316,7 @@ drag_mode: Drag Mode
cancel_crop: Cancel Crop
original: Original
url: URL
import: Import
import_label: Import
file_details: File Details
dimensions: Dimensions
size: Size
Expand Down Expand Up @@ -823,13 +845,13 @@ referential_action_cascade: Delete the {collection} item (cascade)
referential_action_set_null: Nullify the {field} field
referential_action_set_default: Set {field} to its default value
choose_action: Choose Action
continue: Continue
continue_label: Continue
continue_as: >-
{name} is currently authenticated. If you recognize this account, press continue.
editing_role: '{role} Role'
creating_webhook: Creating Webhook
default: Default
delete: Delete
default_label: Default
delete_label: Delete
delete_are_you_sure: >-
This action is permanent and can not be undone. Are you sure you would like to proceed?
delete_field_are_you_sure: >-
Expand Down
2 changes: 1 addition & 1 deletion app/src/lang/translations/nl-NL.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ continue: Doorgaan
editing_role: '{role} Rol'
creating_webhook: Webhook Aanmaken
default: Standaard
delete: Verwijder
delete_label: Verwijder
delete_are_you_sure: >-
Deze actie is permanent en kan niet ongedaan worden gemaakt. Weet u zeker dat u wilt doorgaan?
delete_field_are_you_sure: >-
Expand Down
2 changes: 1 addition & 1 deletion app/src/modules/activity/components/navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<v-icon name="clear" />
</v-list-item-icon>
<v-list-item-content>
<v-text-overflow :text="t('delete')" />
<v-text-overflow :text="t('delete_label')" />
</v-list-item-content>
</v-list-item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<v-card-actions>
<v-button secondary @click="deleteActive = false">{{ t('cancel') }}</v-button>
<v-button :loading="deleteSaving" class="action-delete" @click="deleteSave">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
4 changes: 2 additions & 2 deletions app/src/modules/collections/routes/collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<v-dialog v-if="selection.length > 0" v-model="confirmDelete" @esc="confirmDelete = false">
<template #activator="{ on }">
<v-button
v-tooltip.bottom="batchDeleteAllowed ? t('delete') : t('not_allowed')"
v-tooltip.bottom="batchDeleteAllowed ? t('delete_label') : t('not_allowed')"
:disabled="batchDeleteAllowed !== true"
rounded
icon
Expand All @@ -96,7 +96,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="batchDelete">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
4 changes: 2 additions & 2 deletions app/src/modules/collections/routes/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<template #activator="{ on }">
<v-button
v-if="collectionInfo.meta && collectionInfo.meta.singleton === false"
v-tooltip.bottom="deleteAllowed ? t('delete') : t('not_allowed')"
v-tooltip.bottom="deleteAllowed ? t('delete_label') : t('not_allowed')"
rounded
icon
class="action-delete"
Expand All @@ -80,7 +80,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="deleteAndQuit">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
2 changes: 1 addition & 1 deletion app/src/modules/files/components/navigation-folder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</v-card-text>
<v-card-actions>
<v-button secondary @click="deleteActive = false">{{ t('cancel') }}</v-button>
<v-button :loading="deleteSaving" @click="deleteSave">{{ t('delete') }}</v-button>
<v-button :loading="deleteSaving" @click="deleteSave">{{ t('delete_label') }}</v-button>
</v-card-actions>
</v-card>
</v-dialog>
Expand Down
4 changes: 2 additions & 2 deletions app/src/modules/files/routes/collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<v-dialog v-if="selection.length > 0" v-model="confirmDelete" @esc="confirmDelete = false">
<template #activator="{ on }">
<v-button
v-tooltip.bottom="batchDeleteAllowed ? t('delete') : t('not_allowed')"
v-tooltip.bottom="batchDeleteAllowed ? t('delete_label') : t('not_allowed')"
:disabled="batchDeleteAllowed !== true"
rounded
icon
Expand All @@ -66,7 +66,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="batchDelete">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
4 changes: 2 additions & 2 deletions app/src/modules/files/routes/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<v-dialog v-model="confirmDelete" @esc="confirmDelete = false">
<template #activator="{ on }">
<v-button
v-tooltip.bottom="deleteAllowed ? t('delete') : t('not_allowed')"
v-tooltip.bottom="deleteAllowed ? t('delete_label') : t('not_allowed')"
rounded
icon
class="action-delete"
Expand All @@ -34,7 +34,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="deleteAndQuit">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export default defineComponent({
disabled: interfaceDisplayDisabled(),
},
{
text: t('interface'),
text: t('interface_label'),
value: 'interface',
disabled: interfaceDisplayDisabled(),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<v-card-title>{{ t('delete_field_are_you_sure', { field: field.field }) }}</v-card-title>
<v-card-actions>
<v-button secondary @click="deleteActive = false">{{ t('cancel') }}</v-button>
<v-button :loading="deleting" class="delete" @click="deleteField">{{ t('delete') }}</v-button>
<v-button :loading="deleting" class="delete" @click="deleteField">{{ t('delete_label') }}</v-button>
</v-card-actions>
</v-card>
</v-dialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="deleteAndQuit">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<template #actions>
<v-dialog v-if="selection.length > 0" v-model="confirmDelete" @esc="confirmDelete = false">
<template #activator="{ on }">
<v-button v-tooltip.bottom="t('delete')" rounded icon class="action-delete" @click="on">
<v-button v-tooltip.bottom="t('delete_label')" rounded icon class="action-delete" @click="on">
<v-icon name="delete" outline />
</v-button>
</template>
Expand All @@ -24,7 +24,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="deleteSelection">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down Expand Up @@ -72,7 +72,7 @@

<template #[`item.name`]="{ item }">
<span :class="{ default: item.name === null }">
{{ item.name === null ? t('default') : item.name }}
{{ item.name === null ? t('default_label') : item.name }}
</span>
</template>
</v-table>
Expand Down
4 changes: 2 additions & 2 deletions app/src/modules/settings/routes/presets/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<v-dialog v-model="confirmDelete" @esc="confirmDelete = false">
<template #activator="{ on }">
<v-button
v-tooltip.bottom="t('delete')"
v-tooltip.bottom="t('delete_label')"
rounded
icon
class="action-delete"
Expand All @@ -34,7 +34,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="deleteAndQuit">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
2 changes: 1 addition & 1 deletion app/src/modules/settings/routes/roles/collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default defineComponent({
roles.value = [
{
public: true,
name: t('public'),
name: t('public_label'),
icon: 'public',
description: t('public_description'),
id: 'public',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<v-icon v-tooltip="t('create')" name="add" />
<v-icon v-tooltip="t('read')" name="visibility" />
<v-icon v-tooltip="t('update')" name="edit" outline />
<v-icon v-tooltip="t('delete')" name="delete" outline />
<v-icon v-tooltip="t('delete_label')" name="delete" outline />
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions app/src/modules/settings/routes/roles/item/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<v-dialog v-if="[1, 2].includes(+primaryKey) === false" v-model="confirmDelete" @esc="confirmDelete = false">
<template #activator="{ on }">
<v-button
v-tooltip.bottom="t('delete')"
v-tooltip.bottom="t('delete_label')"
rounded
icon
class="action-delete"
Expand All @@ -29,7 +29,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="deleteAndQuit">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-notice type="info">
{{
t('fields_for_role', {
role: role ? role.name : t('public'),
role: role ? role.name : t('public_label'),
action: t(permission.action).toLowerCase(),
})
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{
t('permissions_for_role', {
action: t(permission.action).toLowerCase(),
role: role ? role.name : t('public'),
role: role ? role.name : t('public_label'),
})
}}
</v-notice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{
t('presets_for_role', {
action: t(permission.action).toLowerCase(),
role: role ? role.name : t('public'),
role: role ? role.name : t('public_label'),
})
}}
</v-notice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{
t('validation_for_role', {
action: t(permission.action).toLowerCase(),
role: role ? role.name : t('public'),
role: role ? role.name : t('public_label'),
})
}}
</v-notice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default defineComponent({
return role.value!.name + ' -> ' + collectionName.value + ' -> ' + t(permission.value.action);
}
return t('public') + ' -> ' + collectionName.value + ' -> ' + t(permission.value.action);
return t('public_label') + ' -> ' + collectionName.value + ' -> ' + t(permission.value.action);
});
watch(() => props.permissionKey, load, { immediate: true });
Expand Down
2 changes: 1 addition & 1 deletion app/src/modules/settings/routes/roles/public-item.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<private-view :title="t('public')">
<private-view :title="t('public_label')">
<template #headline>{{ t('settings_permissions') }}</template>
<template #title-outer:prepend>
<v-button class="header-icon" rounded icon exact :to="`/settings/roles/`">
Expand Down
2 changes: 1 addition & 1 deletion app/src/modules/settings/routes/webhooks/collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="batchDelete">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down
2 changes: 1 addition & 1 deletion app/src/modules/settings/routes/webhooks/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{ t('cancel') }}
</v-button>
<v-button class="action-delete" :loading="deleting" @click="deleteAndQuit">
{{ t('delete') }}
{{ t('delete_label') }}
</v-button>
</v-card-actions>
</v-card>
Expand Down

0 comments on commit d945489

Please sign in to comment.