File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 */
55import { GettextExtractor , JsExtractors } from 'gettext-extractor'
66
7- const extractor = new GettextExtractor ( ) ;
7+ const extractor = new GettextExtractor ( )
88
99extractor
1010 . createJsParser ( [
@@ -15,7 +15,7 @@ extractor
1515 } ,
1616 } ) ,
1717 ] )
18- . parseFilesGlob ( './lib/**/*.@(ts|js)' ) ;
18+ . parseFilesGlob ( './lib/**/*.@(ts|js)' )
1919
2020extractor . savePotFile ( './l10n/messages.pot' )
2121
Original file line number Diff line number Diff line change 22msgstr ""
33"Content-Type : text/plain; charset=UTF-8\n "
44
5- #: lib/index.ts:32
5+ #: lib/index.ts:33
66msgid "seconds"
77msgstr ""
Original file line number Diff line number Diff line change 1- /**
1+ /*!
22 * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
33 * SPDX-License-Identifier: GPL-3.0-or-later
44 */
5+
56interface Translations {
67 locale : string
78 json : object
Original file line number Diff line number Diff line change 1- /**
1+ /*!
22 * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
33 * SPDX-License-Identifier: GPL-3.0-or-later
44 */
5- import moment from 'moment/min/moment-with-locales.js'
5+
66import { getLocale } from '@nextcloud/l10n'
77import { getGettextBuilder } from '@nextcloud/l10n/gettext'
8+ import moment from 'moment/min/moment-with-locales.js'
89
910const locale = getLocale ( )
1011const translations = LOCALES
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ describe('moment', () => {
2525 } )
2626
2727 describe ( 'locale' , ( ) => {
28-
2928 let locale
3029
3130 beforeEach ( ( ) => {
@@ -62,5 +61,4 @@ describe('moment', () => {
6261 expect ( moment ( ) . fromNow ( ) ) . to . equal ( 'il y a quelques secondes' )
6362 } )
6463 } )
65-
6664} )
Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: GPL-3.0-or-later
44 */
55import { createLibConfig } from '@nextcloud/vite-config'
6- import { readFileSync , readdirSync } from 'node:fs'
76import { po as poParser } from 'gettext-parser'
7+ import { readdirSync , readFileSync } from 'node:fs'
88
99const translations = Object . fromEntries ( readdirSync ( './l10n' )
1010 . filter ( ( name ) => name !== 'messages.pot' && name . endsWith ( '.pot' ) )
@@ -23,7 +23,7 @@ const translations = Object.fromEntries(readdirSync('./l10n')
2323
2424 return [
2525 locale ,
26- json
26+ json ,
2727 ]
2828 } ) )
2929
@@ -32,6 +32,6 @@ export default createLibConfig({
3232} , {
3333 libraryFormats : [ 'es' , 'cjs' ] ,
3434 replace : {
35- LOCALES : JSON . stringify ( translations )
35+ LOCALES : JSON . stringify ( translations ) ,
3636 } ,
3737} )
You can’t perform that action at this time.
0 commit comments