Skip to content

Commit 9828f62

Browse files
Rename settings -> simplesettings
In URLs and translation namespaces Signed-off-by: Thomas Lehmann <[email protected]>
1 parent bc3635c commit 9828f62

7 files changed

+49
-49
lines changed

Diff for: src/components/AuthToken.vue

+21-21
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@
3030
@submit.prevent.stop="rename">
3131
<NcTextField ref="input"
3232
:value.sync="newName"
33-
:label="t('settings', 'Device name')"
33+
:label="t('simplesettings', 'Device name')"
3434
:show-trailing-button="true"
35-
:trailing-button-label="t('settings', 'Cancel renaming')"
35+
:trailing-button-label="t('simplesettings', 'Cancel renaming')"
3636
@trailing-button-click="cancelRename"
3737
@keyup.esc="cancelRename" />
38-
<NcButton :aria-label="t('settings', 'Save new name')" type="tertiary" native-type="submit">
38+
<NcButton :aria-label="t('simplesettings', 'Save new name')" type="tertiary" native-type="submit">
3939
<template #icon>
4040
<NcIconSvgWrapper :path="mdiCheck" />
4141
</template>
4242
</NcButton>
4343
</form>
4444
<span v-else>{{ tokenLabel }}</span>
45-
<span v-if="wiping" class="wiping-warning">({{ t('settings', 'Marked for remote wipe') }})</span>
45+
<span v-if="wiping" class="wiping-warning">({{ t('simplesettings', 'Marked for remote wipe') }})</span>
4646
</div>
4747
</td>
4848
<td>
@@ -52,20 +52,20 @@
5252
</td>
5353
<td class="auth-token__actions">
5454
<NcActions v-if="!token.current"
55-
:title="t('settings', 'Device settings')"
56-
:aria-label="t('settings', 'Device settings')"
55+
:title="t('simplesettings', 'Device settings')"
56+
:aria-label="t('simplesettings', 'Device settings')"
5757
:open.sync="actionOpen">
5858
<NcActionCheckbox v-if="canChangeScope"
5959
:checked="token.scope.filesystem"
6060
@update:checked="updateFileSystemScope">
6161
<!-- TODO: add text/longtext with some description -->
62-
{{ t('settings', 'Allow filesystem access') }}
62+
{{ t('simplesettings', 'Allow filesystem access') }}
6363
</NcActionCheckbox>
6464
<NcActionButton v-if="token.canRename"
6565
icon="icon-rename"
6666
@click.stop.prevent="startRename">
6767
<!-- TODO: add text/longtext with some description -->
68-
{{ t('settings', 'Rename') }}
68+
{{ t('simplesettings', 'Rename') }}
6969
</NcActionButton>
7070

7171
<!-- revoke & wipe -->
@@ -74,18 +74,18 @@
7474
<NcActionButton icon="icon-delete"
7575
@click.stop.prevent="revoke">
7676
<!-- TODO: add text/longtext with some description -->
77-
{{ t('settings', 'Revoke') }}
77+
{{ t('simplesettings', 'Revoke') }}
7878
</NcActionButton>
7979
<NcActionButton icon="icon-delete"
8080
@click.stop.prevent="wipe">
81-
{{ t('settings', 'Wipe device') }}
81+
{{ t('simplesettings', 'Wipe device') }}
8282
</NcActionButton>
8383
</template>
8484
<NcActionButton v-else-if="token.type === 2"
8585
icon="icon-delete"
86-
:name="t('settings', 'Revoke')"
86+
:name="t('simplesettings', 'Revoke')"
8787
@click.stop.prevent="revoke">
88-
{{ t('settings', 'Revoking this token might prevent the wiping of your device if it has not started the wipe yet.') }}
88+
{{ t('simplesettings', 'Revoking this token might prevent the wiping of your device if it has not started the wipe yet.') }}
8989
</NcActionButton>
9090
</template>
9191
</NcActions>
@@ -143,14 +143,14 @@ const nameMap = {
143143
firefox: 'Firefox',
144144
chrome: 'Google Chrome',
145145
safari: 'Safari',
146-
androidChrome: t('settings', 'Google Chrome for Android'),
146+
androidChrome: t('simplesettings', 'Google Chrome for Android'),
147147
iphone: 'iPhone',
148148
ipad: 'iPad',
149-
iosClient: t('settings', '{productName} iOS app', { productName: window.oc_defaults.productName }),
150-
androidClient: t('settings', '{productName} Android app', { productName: window.oc_defaults.productName }),
151-
iosTalkClient: t('settings', '{productName} Talk for iOS', { productName: window.oc_defaults.productName }),
152-
androidTalkClient: t('settings', '{productName} Talk for Android', { productName: window.oc_defaults.productName }),
153-
syncClient: t('settings', 'Sync client'),
149+
iosClient: t('simplesettings', '{productName} iOS app', { productName: window.oc_defaults.productName }),
150+
androidClient: t('simplesettings', '{productName} Android app', { productName: window.oc_defaults.productName }),
151+
iosTalkClient: t('simplesettings', '{productName} Talk for iOS', { productName: window.oc_defaults.productName }),
152+
androidTalkClient: t('simplesettings', '{productName} Talk for Android', { productName: window.oc_defaults.productName }),
153+
syncClient: t('simplesettings', 'Sync client'),
154154
davx5: 'DAVx5',
155155
webPirate: 'WebPirate',
156156
sailfishBrowser: 'SailfishBrowser',
@@ -275,17 +275,17 @@ export default defineComponent({
275275
*/
276276
tokenLabel() {
277277
if (this.token.current) {
278-
return t('settings', 'This session')
278+
return t('simplesettings', 'This session')
279279
}
280280
if (this.client === null) {
281281
return this.token.name
282282
}
283283

284284
const name = nameMap[this.client.id]
285285
if (this.client.os) {
286-
return t('settings', '{client} - {version} ({system})', { client: name, system: this.client.os, version: this.client.version })
286+
return t('simplesettings', '{client} - {version} ({system})', { client: name, system: this.client.os, version: this.client.version })
287287
} else if (this.client.version) {
288-
return t('settings', '{client} - {version}', { client: name, version: this.client.version })
288+
return t('simplesettings', '{client} - {version}', { client: name, version: this.client.version })
289289
}
290290
return name
291291
},

Diff for: src/components/AuthTokenList.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
<thead>
2626
<tr>
2727
<th class="token-list__header-device">
28-
{{ t('settings', 'Device') }}
28+
{{ t('simplesettings', 'Device') }}
2929
</th>
3030
<th class="toke-list__header-activity">
31-
{{ t('settings', 'Last activity') }}
31+
{{ t('simplesettings', 'Last activity') }}
3232
</th>
3333
<th>
3434
<span class="hidden-visually">
35-
{{ t('settings', 'Actions') }}
35+
{{ t('simplesettings', 'Actions') }}
3636
</span>
3737
</th>
3838
</tr>

Diff for: src/components/AuthTokenSection.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
<template>
2424
<div id="security" class="section">
25-
<h2>{{ t('settings', 'Devices & sessions', {}, undefined, {sanitize: false}) }}</h2>
25+
<h2>{{ t('simplesettings', 'Devices & sessions', {}, undefined, {sanitize: false}) }}</h2>
2626
<p class="settings-hint hidden-when-empty">
27-
{{ t('settings', 'Web, desktop and mobile clients currently logged in to your account.') }}
27+
{{ t('simplesettings', 'Web, desktop and mobile clients currently logged in to your account.') }}
2828
</p>
2929
<AuthTokenList />
3030
<AuthTokenSetup v-if="canCreateToken" />

Diff for: src/components/AuthTokenSetup.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
:maxlength="120"
3131
:disabled="loading"
3232
class="app-name-text-field"
33-
:label="t('settings', 'App name')"
34-
:placeholder="t('settings', 'App name')" />
33+
:label="t('simplesettings', 'App name')"
34+
:placeholder="t('simplesettings', 'App name')" />
3535
<NcButton type="primary"
3636
:disabled="loading || deviceName.length === 0"
3737
native-type="submit">
38-
{{ t('settings', 'Create new app password') }}
38+
{{ t('simplesettings', 'Create new app password') }}
3939
</NcButton>
4040

4141
<AuthTokenSetupDialog :token="newToken" @close="newToken = null" />
@@ -85,7 +85,7 @@ export default defineComponent({
8585
this.newToken = await this.authTokenStore.addToken(this.deviceName)
8686
} catch (error) {
8787
logger.error(error as Error)
88-
showError(t('settings', 'Error while creating device token'))
88+
showError(t('simplesettings', 'Error while creating device token'))
8989
this.reset()
9090
} finally {
9191
this.loading = false

Diff for: src/components/AuthTokenSetupDialog.vue

+11-11
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
-->
2222
<template>
2323
<NcDialog :open.sync="open"
24-
:name="t('settings', 'New app password')"
24+
:name="t('simplesettings', 'New app password')"
2525
content-classes="token-dialog">
2626
<p>
27-
{{ t('settings', 'Use the credentials below to configure your app or device. For security reasons this password will only be shown once.') }}
27+
{{ t('simplesettings', 'Use the credentials below to configure your app or device. For security reasons this password will only be shown once.') }}
2828
</p>
2929
<div class="token-dialog__name">
30-
<NcTextField :label="t('settings', 'Login')" :value="loginName" readonly />
30+
<NcTextField :label="t('simplesettings', 'Login')" :value="loginName" readonly />
3131
<NcButton type="tertiary"
3232
:title="copyLoginNameLabel"
3333
:aria-label="copyLoginNameLabel"
@@ -39,7 +39,7 @@
3939
</div>
4040
<div class="token-dialog__password">
4141
<NcTextField ref="appPassword"
42-
:label="t('settings', 'Password')"
42+
:label="t('simplesettings', 'Password')"
4343
:value="appPassword"
4444
readonly />
4545
<NcButton type="tertiary"
@@ -53,7 +53,7 @@
5353
</div>
5454
<div class="token-dialog__qrcode">
5555
<NcButton v-if="!showQRCode" @click="showQRCode = true">
56-
{{ t('settings', 'Show QR code for mobile apps') }}
56+
{{ t('simplesettings', 'Show QR code for mobile apps') }}
5757
</NcButton>
5858
<QR v-else :value="qrUrl" />
5959
</div>
@@ -129,15 +129,15 @@ export default defineComponent({
129129
},
130130
copyPasswordLabel() {
131131
if (this.isPasswordCopied) {
132-
return t('settings', 'App password copied!')
132+
return t('simplesettings', 'App password copied!')
133133
}
134-
return t('settings', 'Copy app password')
134+
return t('simplesettings', 'Copy app password')
135135
},
136136
copyLoginNameLabel() {
137137
if (this.isNameCopied) {
138-
return t('settings', 'Login name copied!')
138+
return t('simplesettings', 'Login name copied!')
139139
}
140-
return t('settings', 'Copy login name')
140+
return t('simplesettings', 'Copy login name')
141141
},
142142
},
143143
watch: {
@@ -162,7 +162,7 @@ export default defineComponent({
162162
} catch (e) {
163163
this.isPasswordCopied = false
164164
logger.error(e as Error)
165-
showError(t('settings', 'Could not copy app password. Please copy it manually.'))
165+
showError(t('simplesettings', 'Could not copy app password. Please copy it manually.'))
166166
} finally {
167167
setTimeout(() => {
168168
this.isPasswordCopied = false
@@ -176,7 +176,7 @@ export default defineComponent({
176176
} catch (e) {
177177
this.isNameCopied = false
178178
logger.error(e as Error)
179-
showError(t('settings', 'Could not copy login name. Please copy it manually.'))
179+
showError(t('simplesettings', 'Could not copy login name. Please copy it manually.'))
180180
} finally {
181181
setTimeout(() => {
182182
this.isNameCopied = false

Diff for: src/logger.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
import { getLoggerBuilder } from '@nextcloud/logger'
2424

2525
export default getLoggerBuilder()
26-
.setApp('settings')
26+
.setApp('simplesettings')
2727
.detectUser()
2828
.build()

Diff for: src/store/authtoken.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ import { defineStore } from 'pinia'
2929
import axios from '@nextcloud/axios'
3030
import logger from '../logger'
3131

32-
const BASE_URL = generateUrl('/settings/personal/authtokens')
32+
const BASE_URL = generateUrl('/simplesettings/authtokens')
3333

3434
const confirm = () => {
3535
return new Promise(resolve => {
3636
window.OC.dialogs.confirm(
37-
t('settings', 'Do you really want to wipe your data from this device?'),
38-
t('settings', 'Confirm wipe'),
37+
t('simplesettings', 'Do you really want to wipe your data from this device?'),
38+
t('simplesettings', 'Confirm wipe'),
3939
resolve,
4040
true,
4141
)
@@ -127,7 +127,7 @@ export const useAuthTokenStore = defineStore('auth-token', {
127127
return true
128128
} catch (error) {
129129
logger.error('Could not delete app token', { error })
130-
showError(t('settings', 'Could not delete the app token'))
130+
showError(t('simplesettings', 'Could not delete the app token'))
131131
// Restore
132132
this.tokens.push(token)
133133
}
@@ -157,7 +157,7 @@ export const useAuthTokenStore = defineStore('auth-token', {
157157
return true
158158
} catch (error) {
159159
logger.error('Could not wipe app token', { error })
160-
showError(t('settings', 'Error while wiping the device with the token'))
160+
showError(t('simplesettings', 'Error while wiping the device with the token'))
161161
}
162162
return false
163163
},
@@ -179,7 +179,7 @@ export const useAuthTokenStore = defineStore('auth-token', {
179179
return true
180180
} catch (error) {
181181
logger.error('Could not update app token name', { error })
182-
showError(t('settings', 'Error while updating device token name'))
182+
showError(t('simplesettings', 'Error while updating device token name'))
183183
// Restore
184184
token.name = oldName
185185
}
@@ -204,7 +204,7 @@ export const useAuthTokenStore = defineStore('auth-token', {
204204
return true
205205
} catch (error) {
206206
logger.error('could not update app token scope', { error })
207-
showError(t('settings', 'Error while updating device token scope'))
207+
showError(t('simplesettings', 'Error while updating device token scope'))
208208
// Restore
209209
token.scope[scope] = oldVal
210210
}

0 commit comments

Comments
 (0)