Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e9942cf
chore: add extract scripts and fix dependencies
antsgar Jul 25, 2026
cbe3c69
chore: localization batch 2
antsgar Jul 25, 2026
666a6dc
chore: localization batch 3
antsgar Jul 25, 2026
83883ee
chore: localization batch 4
antsgar Jul 25, 2026
6ee5db6
chore: localization batch 5
antsgar Jul 25, 2026
041678a
chore: fix strings allocated to incorrect batches
antsgar Jul 26, 2026
c4212af
chore: localization batch 6
antsgar Jul 26, 2026
0e870c2
chore: localization batch 7
antsgar Jul 26, 2026
c4d7c9a
chore: add ttag packages
antsgar Jul 26, 2026
67bb53b
chore: localization batch 8
antsgar Jul 26, 2026
e664971
chore: missed strings from all batches
antsgar Jul 26, 2026
9f35854
chore: rename batches 7 and 8
antsgar Jul 26, 2026
49d1cd6
chore: fix issue in batch 3 string
antsgar Jul 26, 2026
88d22d3
chore: rename batch 2
antsgar Jul 26, 2026
b41093c
chore: fix strings allocated to incorrect batches
antsgar Jul 27, 2026
b2f23f9
chore: fix linting issues
antsgar Jul 27, 2026
7f4a183
chore: merge batches 4 and 5
antsgar Jul 28, 2026
5a86125
chore: split batch 3
antsgar Jul 28, 2026
f74954d
chore: reassign help panel strings
antsgar Jul 28, 2026
692785e
chore: add missing strings
antsgar Jul 28, 2026
ed6b955
chore: fix keyboard shortcuts regression and passcode bug
antsgar Jul 28, 2026
e2e6912
chore: fix yarn lock file
antsgar Jul 28, 2026
322abed
chore: fix ts errors
antsgar Jul 28, 2026
e935548
chore: fix ts errors
antsgar Jul 28, 2026
20f8ad2
chore: fix lint issue
antsgar Jul 28, 2026
7c8cbf2
chore: fix lint issues
antsgar Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"changelog:json": "node scripts/ChangelogToJson.js && git add .",
"postversion": "./scripts/push-tags-one-by-one.sh",
"workspace:list": " yarn lerna list -all",
"upgrade:snjs": "ncu -u '@standardnotes/*' && yarn workspaces foreach --verbose run upgrade:snjs"
"upgrade:snjs": "ncu -u '@standardnotes/*' && yarn workspaces foreach --verbose run upgrade:snjs",
"i18n:extract": "yarn workspace @standardnotes/web i18n:extract && yarn workspace @standardnotes/desktop i18n:extract && yarn workspace @standardnotes/mobile i18n:extract && echo 'translations extracted'"
},
"resolutions": {
"@types/styled-components/@types/react": "17.0.2",
Expand Down Expand Up @@ -70,6 +71,7 @@
"npm-check-updates": "^16.10.17",
"prettier": "3.0.0",
"sass-loader": "^13.3.2",
"ttag-cli": "^1.11.2",
"typescript": "5.8.3",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
Expand Down
3 changes: 2 additions & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/utils": "workspace:*",
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.1.13",
"ttag": "^1.8.12"
}
}
33 changes: 25 additions & 8 deletions packages/api/src/Domain/Error/ErrorMessage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
export enum ErrorMessage {
RegistrationInProgress = 'An existing registration request is already in progress.',
GenericRegistrationFail = 'A server error occurred while trying to register. Please try again.',
RateLimited = 'Too many successive server requests. Please wait a few minutes and try again.',
InsufficientPasswordMessage = 'Your password must be at least %LENGTH% characters in length. For your security, please choose a longer password or, ideally, a passphrase, and try again.',
PasscodeRequired = 'Your passcode is required in order to register for an account.',
GenericInProgress = 'An existing request is already in progress.',
GenericFail = 'A server error occurred. Please try again.',
import { c } from 'ttag'

export const ErrorMessage = {
get RegistrationInProgress() {
return c('B1.Account.SignIn.Status').t`An existing registration request is already in progress.`
},
get GenericRegistrationFail() {
return c('B1.Account.SignIn.Error').t`A server error occurred while trying to register. Please try again.`
},
get RateLimited() {
return c('B2.NavSharedUI.Error').t`Too many successive server requests. Please wait a few minutes and try again.`
},
get InsufficientPasswordMessage() {
return c('B1.Account.SignIn.Error')
.t`Your password must be at least %LENGTH% characters in length. For your security, please choose a longer password or, ideally, a passphrase, and try again.`
},
get PasscodeRequired() {
return c('B1.Account.SignIn.Error').t`Your passcode is required in order to register for an account.`
},
get GenericInProgress() {
return c('B2.NavSharedUI.Error').t`An existing request is already in progress.`
},
get GenericFail() {
return c('B2.NavSharedUI.Error').t`A server error occurred. Please try again.`
},
}
11 changes: 7 additions & 4 deletions packages/desktop/app/javascripts/Main/File/FilesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { debounce } from 'lodash'
import path from 'path'
import yauzl from 'yauzl'
import { Result } from '@standardnotes/domain-core'
import { c } from 'ttag'

import { removeFromArray } from '../Utils/Utils'

Expand Down Expand Up @@ -106,7 +107,7 @@ export class FilesManager implements FilesManagerInterface {
try {
fse.removeSync(dirPath)

return Result.ok('Directory deleted successfully')
return Result.ok(c('B8.MobileDesktopShared.Desktop.Info').t`Directory deleted successfully`)
} catch (error) {
return Result.fail((error as Error).message)
}
Expand Down Expand Up @@ -153,7 +154,7 @@ export class FilesManager implements FilesManagerInterface {
try {
await fse.move(dir, destination, { overwrite: true })

return Result.ok('Directory moved successfully')
return Result.ok(c('B8.MobileDesktopShared.Desktop.Info').t`Directory moved successfully`)
} catch (error) {
return Result.fail((error as Error).message)
}
Expand Down Expand Up @@ -197,11 +198,13 @@ export class FilesManager implements FilesManagerInterface {
destDir,
)

return Result.ok('Directory contents moved successfully')
return Result.ok(c('B8.MobileDesktopShared.Desktop.Info').t`Directory contents moved successfully`)
} catch (error) {
console.error(error)

return Result.fail(`Could not move directory contentes: ${(error as Error).message}`)
return Result.fail(
c('B8.MobileDesktopShared.Desktop.Error').t`Could not move directory contents: ${(error as Error).message}`,
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { WebContents } from 'electron'
import { StoreKeys } from '../Store/StoreKeys'
import path from 'path'
import { FileDownloader } from './FileDownloader'
import { c } from 'ttag'
import { FileReadOperation } from './FileReadOperation'
import { Paths } from '../Types/Paths'
import { MessageToWebApp } from '../../Shared/IpcMessages'
Expand Down Expand Up @@ -103,7 +104,7 @@ export class FilesBackupManager implements FileBackupsDevice {
return savedLocation
}

const LegacyTextBackupsDirectory = 'Standard Notes Backups'
const LegacyTextBackupsDirectory = c('B6.Preferences.Backups.Label').t`Standard Notes Backups`
const homeDir = Paths.homeDir
if (homeDir) {
return path.join(homeDir, LegacyTextBackupsDirectory)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import path from 'path'
import os from 'os'
import { c } from 'ttag'

import {
HomeServerManagerInterface,
Expand Down Expand Up @@ -83,7 +84,7 @@ export class HomeServerManager implements HomeServerManagerInterface {
async setHomeServerConfiguration(configurationJSONString: string): Promise<void> {
try {
if (!this.homeServerDataLocation) {
throw new Error('Home server data location is not set.')
throw new Error(c('B6.Preferences.HomeServer.Error').t`Home server data location is not set.`)
}

const homeServerConfiguration = JSON.parse(configurationJSONString) as HomeServerEnvironmentConfiguration
Expand All @@ -93,11 +94,11 @@ export class HomeServerManager implements HomeServerManagerInterface {
const configurationFile: HomeServerConfigurationFile = {
version: '1.0.0',
info: {
warning: 'Do not edit this file.',
information:
'The values below are encrypted with a key created by the desktop application after installation. The key is stored in your secure device keychain.',
instructions:
'Put this file inside your home server data location to restore your home server configuration.',
warning: c('B6.Preferences.Backups.Info').t`Do not edit this file.`,
information: c('B6.Preferences.HomeServer.Info')
.t`The values below are encrypted with a key created by the desktop application after installation. The key is stored in your secure device keychain.`,
instructions: c('B6.Preferences.HomeServer.Info')
.t`Put this file inside your home server data location to restore your home server configuration.`,
},
configuration: homeServerConfiguration,
}
Expand Down
148 changes: 0 additions & 148 deletions packages/desktop/app/javascripts/Main/Strings/english.ts

This file was deleted.

32 changes: 0 additions & 32 deletions packages/desktop/app/javascripts/Main/Strings/french.ts

This file was deleted.

17 changes: 3 additions & 14 deletions packages/desktop/app/javascripts/Main/Strings/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { isDev } from '../Utils/Utils'
import { createEnglishStrings } from './english'
import { createFrenchStrings } from './french'
import { createStrings } from './strings'
import { Strings } from './types'

let strings: Strings
Expand All @@ -10,7 +9,7 @@ let strings: Strings
* @param locale The user's locale
* @see https://www.electronjs.org/docs/api/locales
*/
export function initializeStrings(locale: string): void {
export function initializeStrings(_locale: string): void {
if (isDev()) {
if (strings) {
throw new Error('`strings` has already been initialized')
Expand All @@ -21,7 +20,7 @@ export function initializeStrings(locale: string): void {
return
}

strings = stringsForLocale(locale)
strings = createStrings()
}

export function str(): Strings {
Expand Down Expand Up @@ -53,14 +52,4 @@ export function updates() {
return str().updates
}

function stringsForLocale(locale: string): Strings {
if (locale === 'en' || locale.startsWith('en-')) {
return createEnglishStrings()
} else if (locale === 'fr' || locale.startsWith('fr-')) {
return createFrenchStrings()
}

return createEnglishStrings()
}

export const AppName = 'Standard Notes'
Loading
Loading