Browse Source

Merge pull request #1357 from nocodb/refactor/i18n-3

Refactor/i18n translations
pull/1358/head
Raju Udava 3 years ago committed by GitHub
parent
commit
608335219b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/nc-gui/components/auth/roles.vue
  2. 2
      packages/nc-gui/components/project/appStore.vue
  3. 6
      packages/nc-gui/components/project/cronJobs.vue
  4. 2
      packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableFunctions.vue
  5. 2
      packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableProcedures.vue
  6. 2
      packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableRelations.vue
  7. 15
      packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue
  8. 2
      packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableViews.vue
  9. 2
      packages/nc-gui/components/project/projectMetadata/uiAcl/toggleFunctionUIAcl.vue
  10. 2
      packages/nc-gui/components/project/projectMetadata/uiAcl/toggleProcedureUIAcl.vue
  11. 2
      packages/nc-gui/components/project/projectMetadata/uiAcl/toggleRelationsUIAcl.vue
  12. 2
      packages/nc-gui/components/project/projectMetadata/uiAcl/toggleTableUIAcl.vue
  13. 2
      packages/nc-gui/components/project/projectMetadata/uiAcl/toggleViewUIAcl.vue
  14. 15
      packages/nc-gui/components/project/spreadsheet/components/headerCell.vue
  15. 20
      packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue
  16. 3
      packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listItems.vue
  17. 5
      packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue
  18. 65
      packages/nc-gui/components/project/spreadsheet/views/formView.vue
  19. 8
      packages/nc-gui/components/project/tableTabs/columns.vue
  20. 8
      packages/nc-gui/components/project/tableTabs/columnsMock.vue
  21. 2
      packages/nc-gui/components/project/tableTabs/indexes.vue
  22. 4
      packages/nc-gui/components/project/tableTabs/rows.vue
  23. 4
      packages/nc-gui/components/project/tableTabs/validation.vue
  24. 2
      packages/nc-gui/lang/en.json
  25. 4
      packages/nc-gui/pages/user/admin/index.vue
  26. 4
      packages/nc-gui/pages/user/admin/user/_userId.vue
  27. 16
      scripts/cypress/integration/common/4c_form_view_detailed.js

4
packages/nc-gui/components/auth/roles.vue

@ -105,7 +105,7 @@
v-model="role.title"
v-ge="['roles','title']"
:disabled="role.type === 'SYSTEM'"
label="Edit"
:label="$t('general.edit')"
single-line
@input="edited = true"
/>
@ -122,7 +122,7 @@
v-model="role.description"
v-ge="['roles','title']"
:disabled="role.type === 'SYSTEM'"
label="Edit"
:label="$t('general.edit')"
single-line
@input="edited = true"
/>

2
packages/nc-gui/components/project/appStore.vue

@ -56,7 +56,7 @@
<v-icon x-small class="mr-1">
mdi-pencil
</v-icon>
Edit
{{ $t('general.edit') }}
</v-btn>
<v-btn
v-if="app.parsedInput"

6
packages/nc-gui/components/project/cronJobs.vue

@ -46,14 +46,14 @@
<div style="position: absolute; right:5px;bottom:0">
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"
@click="loadCrons()"
>
<!-- Reload -->
{{ $t('general.reload') }}
<!-- Reload -->
{{ $t('general.reload') }}
</x-btn>
<x-btn
outlined

2
packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableFunctions.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

2
packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableProcedures.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

2
packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableRelations.vue

@ -14,7 +14,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

15
packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableTables.vue

@ -14,7 +14,7 @@
dense
hide-details
class="my-2 mx-auto caption"
:placeholder="`Search models`"
:placeholder="$t('placeholder.searchModels')"
prepend-inner-icon="search"
style="max-width:500px"
outlined
@ -24,7 +24,7 @@
<x-btn
btn.class="nc-btn-metasync-reload"
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"
@ -35,7 +35,7 @@
</x-btn>
<!-- <x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"
@ -62,11 +62,13 @@
<thead>
<tr>
<th class="grey--text">
Models
<!--Models-->
{{ $t('labels.models') }}
</th>
<!-- <th>APIs</th>-->
<th class="grey--text">
Sync state
<!--Sync state-->
{{ $t('labels.syncState') }}
</th>
<th />
</tr>
@ -118,7 +120,8 @@
v-else
class="caption grey--text"
>
{{ 'No change identified' }}
<!--{{ 'No change identified' }}-->
{{ $t('msg.info.metaNoChange') }}
</span>
<!-- <span v-else class="caption grey&#45;&#45;text">Recreate metadata.</span>-->
</td>

2
packages/nc-gui/components/project/projectMetadata/sync/disableOrEnableViews.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

2
packages/nc-gui/components/project/projectMetadata/uiAcl/toggleFunctionUIAcl.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

2
packages/nc-gui/components/project/projectMetadata/uiAcl/toggleProcedureUIAcl.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

2
packages/nc-gui/components/project/projectMetadata/uiAcl/toggleRelationsUIAcl.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

2
packages/nc-gui/components/project/projectMetadata/uiAcl/toggleTableUIAcl.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

2
packages/nc-gui/components/project/projectMetadata/uiAcl/toggleViewUIAcl.vue

@ -23,7 +23,7 @@
<v-spacer />
<x-btn
outlined
tooltip="Reload list"
:tooltip="$t('tooltip.reloadList')"
small
color="primary"
icon="refresh"

15
packages/nc-gui/components/project/spreadsheet/components/headerCell.vue

@ -63,7 +63,10 @@
<x-icon small class="mr-1" color="primary">
mdi-pencil
</x-icon>
<span class="caption">Edit</span>
<span class="caption">
<!--Edit-->
{{ $t('general.edit') }}
</span>
</v-list-item>
<v-list-item dense @click="setAsPrimaryValue">
<x-icon small class="mr-1" color="primary">
@ -71,7 +74,10 @@
</x-icon>
<v-tooltip bottom>
<template #activator="{on}">
<span class="caption" v-on="on">Set as Primary value</span>
<span class="caption" v-on="on">
<!--Set as Primary value-->
{{ $t('activity.setPrimary') }}
</span>
</template>
<span class="caption font-weight-bold">Primary value will be shown in place of primary key</span>
</v-tooltip>
@ -80,7 +86,10 @@
<x-icon small class="mr-1" color="error">
mdi-delete-outline
</x-icon>
<span class="caption">Delete</span>
<span class="caption">
<!--Delete-->
{{ $t('general.delete') }}
</span>
</v-list-item>
</v-list>
</v-menu>

20
packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue

@ -7,16 +7,20 @@
<thead>
<tr class="">
<th class="caption grey--text">
View name
<!--View name-->
{{ $t('labels.viewName') }}
</th>
<th class="caption grey--text">
View Link
<!--View Link-->
{{ $t('labels.viewLink') }}
</th>
<th class="caption grey--text">
Password
<!--Password-->
{{ $t('labels.password') }}
</th>
<th class="caption grey--text">
Actions
<!--Actions-->
{{ $t('labels.actions') }}
</th>
</tr>
</thead>
@ -54,7 +58,8 @@
<tr v-else>
<td colspan="4" class="text-center caption info--text">
Current view is not shared!
<!--Current view is not shared!-->
{{ $t('msg.info.viewNotShared') }}
</td>
</tr>
<template v-if="allSharedLinks">
@ -98,7 +103,10 @@
hide-details
>
<template #label>
<span class="caption"> Show all shared views of this table</span>
<span class="caption">
<!--Show all shared views of this table-->
{{ $t('msg.info.showAllViews') }}
</span>
</template>
</v-switch>
</div>

3
packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listItems.vue

@ -63,7 +63,8 @@
</template>
<div v-else-if="data" class="text-center py-15 textLight--text">
No items found
<!--No items found-->
{{ $t('placeholder.noItemsFound') }}
</div>
</div>
</v-card-text>

5
packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue

@ -141,7 +141,7 @@
</v-icon>
<!-- tooltip="Reload view data" -->
<x-icon
tooltip="Reload view data"
:tooltip="$t('general.reload')"
icon.class="nc-table-reload-btn mx-1"
small
@click="reload"
@ -264,8 +264,9 @@
</v-list>
</v-menu>-->
<!--tooltip="Toggle navigation drawer"-->
<x-btn
tooltip="Toggle navigation drawer"
:tooltip="$t('tooltip.toggleNavDraw')"
outlined
small
text

65
packages/nc-gui/components/project/spreadsheet/views/formView.vue

@ -22,20 +22,29 @@
<v-col v-if="isEditable" class="h-100 col-md-4 col-lg-3">
<v-card class="h-100 overflow-auto pa-4 pa-md-6 backgroundColor elevation-0 nc-form-left-nav">
<div class="d-flex grey--text">
<span class="">Fields</span>
<span class="">
<!--Fields-->
{{ $t('objects.fields') }}
</span>
<v-spacer />
<span
v-if="hiddenColumns.length"
class="pointer caption mr-2"
style="border-bottom: 2px solid rgb(218,218,218)"
@click="addAllColumns()"
>add all</span>
>
<!--Add all-->
{{ $t('general.addAll') }}
</span>
<span
v-if="columns.length"
class="pointer caption"
style="border-bottom: 2px solid rgb(218,218,218)"
@click="columns=[]"
>remove all</span>
>
<!--Remove all-->
{{ $t('general.removeAll') }}
</span>
</div>
<draggable
v-if="showFields "
@ -79,7 +88,8 @@
</div>
</v-card>
<div class="mt-4 nc-drag-n-drop-to-hide py-3 text-center grey--text text--lighter-1">
Drag and drop fields here to hide
<!--Drag and drop fields here to hide-->
{{ $t('msg.info.dragDropHide') }}
</div>
</draggable>
@ -94,7 +104,8 @@
<v-icon size="20" color="grey">
mdi-plus
</v-icon>
Add new field to this table
<!--Add new field to this table-->
{{ $t('activity.addField') }}
</div>
</template>
<edit-column
@ -141,13 +152,13 @@
>
{{ localParams.name }}
</editable>
<!--placeholder="Add form description"-->
<editable
:is="isEditable ? 'editable' : 'div'"
v-model.lazy="localParams.description"
:class="{'nc-meta-inputs': isEditable}"
class="body-1 text-left mx-4 py-2 px-1 text--text text--lighten-2"
placeholder="Add form description"
:placeholder="$t('msg.info.formDesc')"
>
{{ localParams.description }}
</editable>
@ -193,7 +204,10 @@
<label
class="grey--text caption ml-2"
@click="localParams.fields[col.alias].required= !localParams.fields[col.alias].required"
>Required</label>
>
<!--Required-->
{{ $t('general.required') }}
</label>
<v-switch
v-model="localParams.fields[col.alias].required"
class="nc-required-switch ml-1 mt-0"
@ -204,16 +218,18 @@
inset
/>
</div>
<!--placeholder=" Enter form input label"-->
<editable
v-model="localParams.fields[col.alias].label"
style="width:300px;white-space: pre-wrap"
placeholder=" Enter form input label"
:placeholder="$t('msg.info.formInput')"
class="caption pa-1 backgroundColor darken-1 mb-2 "
/>
<!--placeholder=" Add some help text"-->
<editable
v-model="localParams.fields[col.alias].description"
style="width:300px;white-space: pre-wrap"
placeholder=" Add some help text"
:placeholder="$t('msg.info.formHelpText')"
class="caption pa-1 backgroundColor darken-1 mb-2"
@keydown.enter.prevent
/>
@ -336,7 +352,8 @@
</draggable>
<div class="my-10 text-center">
<v-btn color="primary" :loading="loading" :disabled="loading" @click="save">
Submit
<!--Submit-->
{{ $t('general.submit') }}
</v-btn>
<!-- <span class="caption grey&#45;&#45;text pointer">Edit label</span>-->
</div>
@ -353,9 +370,13 @@
</v-switch>-->
<div class="caption grey--text mt-10 mb-2">
After form is submitted:
<!--After form is submitted:-->
{{ $t('msg.info.afterFormSubmitted') }}
</div>
<label class="caption grey--text font-weight-bold">Show this message:</label>
<label class="caption grey--text font-weight-bold">
<!--Show this message:-->
{{ $t('msg.info.showMessage') }}:
</label>
<v-textarea
v-model="localParams.submit.message"
rows="3"
@ -367,12 +388,18 @@
<v-switch v-model="localParams.submit.showAnotherSubmit" dense inset hide-details class="nc-switch">
<template #label>
<span class="font-weight-bold grey--text caption">Show "Submit Another Form" button</span>
<span class="font-weight-bold grey--text caption">
<!--Show "Submit Another Form" button-->
{{ $t('msg.info.submitAnotherForm') }}
</span>
</template>
</v-switch>
<v-switch v-model="localParams.submit.showBlankForm" dense inset hide-details class="nc-switch">
<template #label>
<span class="font-weight-bold grey--text caption">Show a blank form after 5 seconds</span>
<span class="font-weight-bold grey--text caption">
<!--Show a blank form after 5 seconds-->
{{ $t('msg.info.showBlankForm') }}
</span>
</template>
</v-switch>
<v-switch
@ -385,9 +412,11 @@
@change="checkSMTPStatus"
>
<template #label>
<span class="caption font-weight-bold grey--text ">Email me at <span class="font-eright-bold">{{
$store.state.users.user.email
}}</span></span>
<span class="caption font-weight-bold grey--text ">
{{ $t('msg.info.emailForm') }} <span class="font-eright-bold">{{
$store.state.users.user.email
}}</span>
</span>
</template>
</v-switch>
</div>

8
packages/nc-gui/components/project/tableTabs/columns.vue

@ -368,7 +368,7 @@
v-model="props.item.cn"
:disabled="props.item.rcn || !sqlUi.columnEditable(props.item)"
:rules="form.validation.required"
label="Edit"
:label="$t('general.edit')"
single-line
/>
</template>
@ -419,7 +419,7 @@
v-ge="['columns','precision']"
:disabled="sqlUi.getDefaultLengthIsDisabled(props.item.dt) || !sqlUi.columnEditable(props.item)"
:rules="[max25chars]"
label="Edit"
:label="$t('general.edit')"
single-line
/>
</template>
@ -441,7 +441,7 @@
v-ge="['columns','scale']"
:disabled="!sqlUi.columnEditable(props.item)"
:rules="[max25chars]"
label="Edit"
:label="$t('general.edit')"
single-line
/>
</template>
@ -641,7 +641,7 @@
v-model="props.item.cdf"
v-ge="['columns','default']"
:disabled="!sqlUi.columnEditable(props.item)"
label="Edit"
:label="$t('general.edit')"
counter
class="caption"
:placeholder="`${sqlUi.getDefaultValueForDatatype(props.item.dt)}`"

8
packages/nc-gui/components/project/tableTabs/columnsMock.vue

@ -122,7 +122,7 @@
v-model="props.item.cn"
:disabled="props.item.rcn"
:rules="[max25chars]"
label="Edit"
:label="$t('general.edit')"
single-line
/>
</template>
@ -180,7 +180,7 @@
<v-text-field
v-model="props.item.dtxp"
:rules="[max25chars]"
label="Edit"
:label="$t('general.edit')"
single-line
/>
</template>
@ -201,7 +201,7 @@
<v-text-field
v-model="props.item.dtxs"
:rules="[max25chars]"
label="Edit"
:label="$t('general.edit')"
single-line
/>
</template>
@ -304,7 +304,7 @@
<template #input>
<v-text-field
v-model="props.item.cdf"
label="Edit"
:label="$t('general.edit')"
single-line
counter
autofocus

2
packages/nc-gui/components/project/tableTabs/indexes.vue

@ -130,7 +130,7 @@
:disabled="props.index !== selected"
class="body-2"
:rules="[max25chars]"
label="Edit"
:label="$t('general.edit')"
single-line
counter
/>

4
packages/nc-gui/components/project/tableTabs/rows.vue

@ -114,7 +114,7 @@
<v-text-field
v-model="item.data[text]"
class="mt-0 caption"
label="Edit"
:label="$t('general.edit')"
:type="getType(type)"
single-line
hide-details
@ -144,7 +144,7 @@
v-ge="['rows','save']"
dense
hide-details
label="Edit"
:label="$t('general.edit')"
:type="getType(type)"
:placeholder="text"
:disabled="ai"

4
packages/nc-gui/components/project/tableTabs/validation.vue

@ -76,7 +76,7 @@
<template #input>
<v-text-field
v-model="item._cn"
label="Edit"
:label="$t('general.edit')"
single-line
@input="edited=true"
/>
@ -269,7 +269,7 @@
<template #input>
<v-text-field
v-model="clickedItem.validate.msg[i]"
label="Edit"
:label="$t('general.edit')"
single-line
@input="edited=true"
/>

2
packages/nc-gui/lang/en.json

@ -322,7 +322,7 @@
"reloadApiToken": "Reload API tokens",
"generateNewApiToken": "Generate new API token",
"addRole": "Add new role",
"metaReloadList": "Reload list",
"reloadList": "Reload list",
"metaSync": "Sync metadata",
"sqlMigration": "Reload migrations",
"updateRestart": "Update & Restart",

4
packages/nc-gui/pages/user/admin/index.vue

@ -8,10 +8,10 @@
{{ u.username }}
</router-link>
<v-btn color="info">
Edit
{{ $t('general.edit') }}
</v-btn>
<v-btn color="error">
Delete
{{ $t('general.delete') }}
</v-btn>
</v-card-title>
<hr>

4
packages/nc-gui/pages/user/admin/user/_userId.vue

@ -35,11 +35,11 @@
/>
<v-btn color="primary" @click="editUser">
Edit
{{ $t('general.edit') }}
</v-btn>
<v-btn color="red" @click="removeUser">
Delete
{{ $t('general.delete') }}
</v-btn>
</v-form>
</v-card>

16
scripts/cypress/integration/common/4c_form_view_detailed.js

@ -87,7 +87,7 @@ export const genTest = (apiType, dbType) => {
it(`Validate ${viewType} view: Inverted order field member addition from menu`, () => {
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.click();
// click fields in inverted order: LastUpdate, Country => City
@ -138,17 +138,17 @@ export const genTest = (apiType, dbType) => {
// ensure buttons exist on left hand menu
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("add all")
.contains("Add all")
.should("not.exist");
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.should("exist");
// click: remove-all
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.click();
// form should not contain any "field remove icons" -- except for mandatory field (Country)
cy.get(".nc-form")
@ -158,15 +158,15 @@ export const genTest = (apiType, dbType) => {
// menu bar should contain 3 .pointer.item (LastUpdate, County->City)
cy.get(".col-md-4").find(".pointer.item").its("length").should("eq", 2);
// click: add all
// cy.get('.col-md-4').find('.pointer.caption').contains('remove all').should('not.exist')
// click: Add all
// cy.get('.col-md-4').find('.pointer.caption').contains('Remove all').should('not.exist')
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("add all")
.contains("Add all")
.click();
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.should("exist");
// form should contain "field remove icons"
cy.get(".nc-form").find(".nc-field-remove-icon").should("exist");

Loading…
Cancel
Save