@jupyterlab/translation
Advanced tools
Comparing version 4.0.0-beta.1 to 4.0.0-beta.2
@@ -5,5 +5,8 @@ import type { IRenderMime } from '@jupyterlab/rendermime-interfaces'; | ||
import { Token } from '@lumino/coreutils'; | ||
type Language = { | ||
export type Language = { | ||
[key: string]: string; | ||
}; | ||
/** | ||
* Translation connection interface. | ||
*/ | ||
export interface ITranslatorConnector extends IDataConnector<Language, Language, { | ||
@@ -13,2 +16,5 @@ language: string; | ||
} | ||
/** | ||
* A service to connect to the server translation endpoint | ||
*/ | ||
export declare const ITranslatorConnector: Token<ITranslatorConnector>; | ||
@@ -34,3 +40,5 @@ export declare class TranslatorConnector extends DataConnector<Language, Language, { | ||
} | ||
/** | ||
* Translation provider token | ||
*/ | ||
export declare const ITranslator: Token<ITranslator>; | ||
export {}; |
@@ -8,3 +8,6 @@ /* ---------------------------------------------------------------------------- | ||
import { requestTranslationsAPI } from './server'; | ||
export const ITranslatorConnector = new Token('@jupyterlab/translation:ITranslatorConnector'); | ||
/** | ||
* A service to connect to the server translation endpoint | ||
*/ | ||
export const ITranslatorConnector = new Token('@jupyterlab/translation:ITranslatorConnector', 'A service to connect to the server translation endpoint.'); | ||
export class TranslatorConnector extends DataConnector { | ||
@@ -20,3 +23,6 @@ constructor(translationsUrl = '', serverSettings) { | ||
} | ||
export const ITranslator = new Token('@jupyterlab/translation:ITranslator'); | ||
/** | ||
* Translation provider token | ||
*/ | ||
export const ITranslator = new Token('@jupyterlab/translation:ITranslator', 'A service to translate strings.'); | ||
//# sourceMappingURL=tokens.js.map |
{ | ||
"name": "@jupyterlab/translation", | ||
"version": "4.0.0-beta.1", | ||
"version": "4.0.0-beta.2", | ||
"description": "JupyterLab - Translation services", | ||
@@ -38,19 +38,19 @@ "keywords": [ | ||
"test:cov": "jest --collect-coverage", | ||
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", | ||
"test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch", | ||
"test:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand", | ||
"test:debug:watch": "node --inspect-brk ../../node_modules/.bin/jest --runInBand --watch", | ||
"watch": "tsc -w" | ||
}, | ||
"dependencies": { | ||
"@jupyterlab/coreutils": "^6.0.0-beta.1", | ||
"@jupyterlab/rendermime-interfaces": "^3.8.0-beta.1", | ||
"@jupyterlab/services": "^7.0.0-beta.1", | ||
"@jupyterlab/statedb": "^4.0.0-beta.1", | ||
"@lumino/coreutils": "^2.0.0" | ||
"@jupyterlab/coreutils": "^6.0.0-beta.2", | ||
"@jupyterlab/rendermime-interfaces": "^3.8.0-beta.2", | ||
"@jupyterlab/services": "^7.0.0-beta.2", | ||
"@jupyterlab/statedb": "^4.0.0-beta.2", | ||
"@lumino/coreutils": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"@jupyterlab/testing": "^4.0.0-beta.1", | ||
"@jupyterlab/testing": "^4.0.0-beta.2", | ||
"@types/jest": "^29.2.0", | ||
"jest": "^29.2.0", | ||
"rimraf": "~3.0.0", | ||
"typescript": "~5.0.2" | ||
"typescript": "~5.0.4" | ||
}, | ||
@@ -57,0 +57,0 @@ "publishConfig": { |
@@ -15,9 +15,16 @@ /* ---------------------------------------------------------------------------- | ||
*/ | ||
type Language = { [key: string]: string }; | ||
export type Language = { [key: string]: string }; | ||
/** | ||
* Translation connection interface. | ||
*/ | ||
export interface ITranslatorConnector | ||
extends IDataConnector<Language, Language, { language: string }> {} | ||
/** | ||
* A service to connect to the server translation endpoint | ||
*/ | ||
export const ITranslatorConnector = new Token<ITranslatorConnector>( | ||
'@jupyterlab/translation:ITranslatorConnector' | ||
'@jupyterlab/translation:ITranslatorConnector', | ||
'A service to connect to the server translation endpoint.' | ||
); | ||
@@ -61,4 +68,8 @@ | ||
/** | ||
* Translation provider token | ||
*/ | ||
export const ITranslator = new Token<ITranslator>( | ||
'@jupyterlab/translation:ITranslator' | ||
'@jupyterlab/translation:ITranslator', | ||
'A service to translate strings.' | ||
); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85036
2029