-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from nidib/v0.0.5-alpha
Releases v0.0.5-alpha
- Loading branch information
Showing
12 changed files
with
118 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ out | |
dist | ||
node_modules | ||
.vscode-test/ | ||
.DS_Store | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# Changelog | ||
|
||
## Version 0.0.5-alpha | ||
* Easier configuration | ||
* Supports multiple term languages | ||
* On/Off extension toggle | ||
|
||
## Version 0.0.1-alpha | ||
* First release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,18 @@ | |
"displayName": "Term Preview", | ||
"description": "Preview your project's international terms", | ||
"publisher": "richard-bidin", | ||
"author": { | ||
"name": "Richard Bidin" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/nidib/term-preview" | ||
}, | ||
"version": "0.0.1-alpha", | ||
"bugs": { | ||
"url": "https://github.com/nidib/term-preview/issues", | ||
"email": "[email protected]" | ||
}, | ||
"version": "0.0.5-alpha", | ||
"engines": { | ||
"vscode": "^1.63.0" | ||
}, | ||
|
@@ -18,45 +25,29 @@ | |
"configuration": { | ||
"title": "Term Preview", | ||
"properties": { | ||
"termPreview.absolutePathToProjectRoot": { | ||
"type": "string", | ||
"markdownDescription": "The absolute path to your project root", | ||
"default": "" | ||
}, | ||
"termPreview.innerPathToTermsRoot": { | ||
"type": "string", | ||
"markdownDescription": "The path to the terms folder relative to the project root", | ||
"default": "" | ||
"termPreview.enabled": { | ||
"order": 0, | ||
"type": "boolean", | ||
"markdownDescription": "Enables the term preview on hover", | ||
"default": false | ||
}, | ||
"termPreview.filePrefix": { | ||
"termPreview.absolutePathToTermsRoot": { | ||
"type": "string", | ||
"markdownDescription": "The file prefix", | ||
"markdownDescription": "The absolute path to your terms root", | ||
"default": "" | ||
}, | ||
"termPreview.language": { | ||
"termPreview.file": { | ||
"type": "string", | ||
"markdownDescription": "Goes in between prefix, and suffix", | ||
"default": "en-us" | ||
}, | ||
"termPreview.fileSuffix": { | ||
"type": "string", | ||
"markdownDescription": "The file suffix including the extension", | ||
"markdownDescription": "Your file name. `{{LANGUAGE}}` is the placeholder for the language", | ||
"default": "" | ||
}, | ||
"termPreview.fileSeparator": { | ||
"type": "string", | ||
"markdownDescription": "Goes in between prefix, language, and suffix", | ||
"default": "." | ||
}, | ||
"termPreview.showFlag": { | ||
"type": "boolean", | ||
"markdownDescription": "Whether or not to display the language flag", | ||
"default": false | ||
}, | ||
"termPreview.watchForChanges": { | ||
"type": "boolean", | ||
"markdownDescription": "Whether or not to keep watching for changes on your file", | ||
"default": false | ||
"termPreview.languages": { | ||
"type":"array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"markdownDescription": "The languages you want your terms translated to (must match file names)", | ||
"default": ["en-us"] | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import * as vscode from 'vscode'; | ||
|
||
export interface ITermHover extends vscode.HoverProvider { | ||
getTerms: MapCallback<string>; | ||
language: string; | ||
showFlag: boolean; | ||
getTranslationsByTerm: Callback<string, string[]>; | ||
} | ||
|
||
export interface ExtensionConfig { | ||
language: string; | ||
path: string | null; | ||
showFlag: boolean; | ||
watchForChanges: boolean; | ||
enabled: boolean, | ||
filePath: string; | ||
languages: string[]; | ||
} | ||
|
||
export type Map<T> = { [key: string]: T }; | ||
|
||
export type MapCallback<T> = () => Map<T>; | ||
export type Callback<I, T> = (_arg0: I) => T; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
const configDefaults = { | ||
ABS_PATH: '', | ||
REL_PATH: '', | ||
FILE_PREFIX: '', | ||
LANGUAGE: 'en-us', | ||
FILE_SUFFIX: '', | ||
FILE_SEPARATOR: '.', | ||
SHOW_FLAG: false, | ||
WATCH_FILES: true | ||
ENABLED: false, | ||
FILE: '', | ||
LANGUAGES: ['en-us'] | ||
}; | ||
|
||
export default configDefaults; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const LANGUAGE = '{{LANGUAGE}}'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { LANGUAGE } from '../constants/fileNamePlaceholders'; | ||
import getInitialConfig from './getConfig'; | ||
|
||
export const getFilePaths = (): string[] => { | ||
const { languages, filePath } = getInitialConfig(); | ||
|
||
return languages.map(language => filePath.replace(LANGUAGE, language)); | ||
} |
Oops, something went wrong.