mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
parent
fab6f8871a
commit
43dd9b76b0
|
@ -23,7 +23,7 @@
|
|||
"commands": [
|
||||
{
|
||||
"command": "git.refresh",
|
||||
"title": "Refresh",
|
||||
"title": "%command.refresh%",
|
||||
"category": "Git",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/refresh.svg",
|
||||
|
@ -32,17 +32,17 @@
|
|||
},
|
||||
{
|
||||
"command": "git.openChange",
|
||||
"title": "Open Change",
|
||||
"title": "%command.openChange%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.openFile",
|
||||
"title": "Open File",
|
||||
"title": "%command.openFile%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.stage",
|
||||
"title": "Stage",
|
||||
"title": "%command.stage%",
|
||||
"category": "Git",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/stage.svg",
|
||||
|
@ -51,7 +51,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.stageAll",
|
||||
"title": "Stage All",
|
||||
"title": "%command.stageAll%",
|
||||
"category": "Git",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/stage.svg",
|
||||
|
@ -60,7 +60,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.unstage",
|
||||
"title": "Unstage",
|
||||
"title": "%command.unstage%",
|
||||
"category": "Git",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/unstage.svg",
|
||||
|
@ -69,7 +69,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.unstageAll",
|
||||
"title": "Unstage All",
|
||||
"title": "%command.unstageAll%",
|
||||
"category": "Git",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/unstage.svg",
|
||||
|
@ -78,7 +78,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.clean",
|
||||
"title": "Clean",
|
||||
"title": "%command.clean%",
|
||||
"category": "Git",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/clean.svg",
|
||||
|
@ -87,7 +87,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.cleanAll",
|
||||
"title": "Clean All",
|
||||
"title": "%command.cleanAll%",
|
||||
"category": "Git",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/clean.svg",
|
||||
|
@ -96,72 +96,72 @@
|
|||
},
|
||||
{
|
||||
"command": "git.commitStaged",
|
||||
"title": "Commit Staged",
|
||||
"title": "%command.commitStaged%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.commitStagedSigned",
|
||||
"title": "Commit Staged (Signed Off)",
|
||||
"title": "%command.commitStagedSigned%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.commitAll",
|
||||
"title": "Commit All",
|
||||
"title": "%command.commitAll%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.commitAllSigned",
|
||||
"title": "Commit All (Signed Off)",
|
||||
"title": "%command.commitAllSigned%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.undoCommit",
|
||||
"title": "Undo Last Commit",
|
||||
"title": "%command.undoCommit%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.checkout",
|
||||
"title": "Checkout to...",
|
||||
"title": "%command.checkout%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.branch",
|
||||
"title": "Create Branch...",
|
||||
"title": "%command.branch%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.pull",
|
||||
"title": "Pull",
|
||||
"title": "%command.pull%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.pullRebase",
|
||||
"title": "Pull (Rebase)",
|
||||
"title": "%command.pullRebase%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.push",
|
||||
"title": "Push",
|
||||
"title": "%command.push%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.pushTo",
|
||||
"title": "Push to...",
|
||||
"title": "%command.pushTo%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.sync",
|
||||
"title": "Sync",
|
||||
"title": "%command.sync%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.publish",
|
||||
"title": "Publish",
|
||||
"title": "%command.publish%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.showOutput",
|
||||
"title": "Show Git Output",
|
||||
"title": "%command.showOutput%",
|
||||
"category": "Git"
|
||||
}
|
||||
],
|
||||
|
@ -352,7 +352,7 @@
|
|||
{
|
||||
"id": "git-commit",
|
||||
"aliases": [
|
||||
"Git Commit Message",
|
||||
"%language-alias.git-commit%",
|
||||
"git-commit"
|
||||
],
|
||||
"filenames": [
|
||||
|
@ -364,7 +364,7 @@
|
|||
{
|
||||
"id": "git-rebase",
|
||||
"aliases": [
|
||||
"Git Rebase Message",
|
||||
"%language-alias.git-rebase%",
|
||||
"git-rebase"
|
||||
],
|
||||
"filenames": [
|
||||
|
|
27
extensions/git/package.nls.json
Normal file
27
extensions/git/package.nls.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"command.refresh": "Refresh",
|
||||
"command.openChange": "Open Change",
|
||||
"command.openFile": "Open File",
|
||||
"command.stage": "Stage",
|
||||
"command.stageAll": "Stage All",
|
||||
"command.unstage": "Unstage",
|
||||
"command.unstageAll": "Unstage All",
|
||||
"command.clean": "Clean",
|
||||
"command.cleanAll": "Clean All",
|
||||
"command.commitStaged": "Commit Staged",
|
||||
"command.commitStagedSigned": "Commit Staged (Signed Off)",
|
||||
"command.commitAll": "Commit All",
|
||||
"command.commitAllSigned": "Commit All (Signed Off)",
|
||||
"command.undoCommit": "Undo Last Commit",
|
||||
"command.checkout": "Checkout to...",
|
||||
"command.branch": "Create Branch...",
|
||||
"command.pull": "Pull",
|
||||
"command.pullRebase": "Pull (Rebase)",
|
||||
"command.push": "Push",
|
||||
"command.pushTo": "Push to...",
|
||||
"command.sync": "Sync",
|
||||
"command.publish": "Publish",
|
||||
"command.showOutput": "Show Git Output",
|
||||
"language-alias.git-commit": "Git Commit Message",
|
||||
"language-alias.git-rebase": "Git Rebase Message"
|
||||
}
|
|
@ -9,6 +9,9 @@ import { Uri, commands, scm, Disposable, SCMResourceGroup, SCMResource, window,
|
|||
import { IRef, RefType } from './git';
|
||||
import { Model, Resource, Status } from './model';
|
||||
import * as path from 'path';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
function resolveGitURI(uri: Uri): SCMResource | SCMResourceGroup | undefined {
|
||||
if (uri.authority !== 'git') {
|
||||
|
@ -50,12 +53,16 @@ class CheckoutItem implements QuickPickItem {
|
|||
|
||||
class CheckoutTagItem extends CheckoutItem {
|
||||
|
||||
get description(): string { return `Tag at ${this.shortCommit}`; }
|
||||
get description(): string {
|
||||
return localize('tag at', "Tag at {0}", this.shortCommit);
|
||||
}
|
||||
}
|
||||
|
||||
class CheckoutRemoteHeadItem extends CheckoutItem {
|
||||
|
||||
get description(): string { return `Remote branch at ${this.shortCommit}`; }
|
||||
get description(): string {
|
||||
return localize('remote branch at', "Remote branch at {0}", this.shortCommit);
|
||||
}
|
||||
|
||||
protected get treeish(): string | undefined {
|
||||
if (!this.ref.name) {
|
||||
|
@ -93,7 +100,7 @@ export class CommandCenter {
|
|||
|
||||
switch (err.gitErrorCode) {
|
||||
case 'DirtyWorkTree':
|
||||
message = 'Please clean your repository working tree before checkout.';
|
||||
message = localize('clean repo', "Please clean your repository working tree before checkout.");
|
||||
break;
|
||||
default:
|
||||
message = (err.stderr || err.message).replace(/^error: /, '');
|
||||
|
@ -106,7 +113,7 @@ export class CommandCenter {
|
|||
}
|
||||
|
||||
const outputChannel = this.outputChannel as OutputChannel;
|
||||
const openOutputChannelChoice = 'Open Git Log';
|
||||
const openOutputChannelChoice = localize('open git log', "Open Git Log");
|
||||
const choice = await window.showErrorMessage(message, openOutputChannelChoice);
|
||||
|
||||
if (choice === openOutputChannelChoice) {
|
||||
|
@ -270,9 +277,9 @@ export class CommandCenter {
|
|||
}
|
||||
|
||||
const basename = path.basename(resource.uri.fsPath);
|
||||
const message = `Are you sure you want to clean changes in ${basename}?`;
|
||||
const yes = 'Yes';
|
||||
const no = 'No, keep them';
|
||||
const message = localize('confirm clean', "Are you sure you want to clean changes in {0}?", basename);
|
||||
const yes = localize('yes', "Yes");
|
||||
const no = localize('no, keep them', "No, keep them");
|
||||
const pick = await window.showQuickPick([yes, no], { placeHolder: message });
|
||||
|
||||
if (pick !== yes) {
|
||||
|
@ -285,9 +292,9 @@ export class CommandCenter {
|
|||
@CommandCenter.Command('git.cleanAll')
|
||||
@CommandCenter.CatchErrors
|
||||
async cleanAll(): Promise<void> {
|
||||
const message = `Are you sure you want to clean all changes?`;
|
||||
const yes = 'Yes';
|
||||
const no = 'No, keep them';
|
||||
const message = localize('confirm clean all', "Are you sure you want to clean all changes?");
|
||||
const yes = localize('yes', "Yes");
|
||||
const no = localize('no, keep them', "No, keep them");
|
||||
const pick = await window.showQuickPick([yes, no], { placeHolder: message });
|
||||
|
||||
if (pick !== yes) {
|
||||
|
@ -359,8 +366,8 @@ export class CommandCenter {
|
|||
@CommandCenter.CatchErrors
|
||||
async branch(): Promise<void> {
|
||||
const result = await window.showInputBox({
|
||||
placeHolder: 'Branch name',
|
||||
prompt: 'Please provide a branch name'
|
||||
placeHolder: localize('branch name', "Branch name"),
|
||||
prompt: localize('provide branch name', "Please provide a branch name")
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
|
@ -406,7 +413,7 @@ export class CommandCenter {
|
|||
async publish(): Promise<void> {
|
||||
const branchName = this.model.HEAD && this.model.HEAD.name || '';
|
||||
const picks = this.model.remotes.map(r => r.name);
|
||||
const placeHolder = `Pick a remote to publish the branch '${branchName}' to:`;
|
||||
const placeHolder = localize('pick remote', "Pick a remote to publish the branch '{0}' to:", branchName);
|
||||
const choice = await window.showQuickPick(picks, { placeHolder });
|
||||
|
||||
if (!choice) {
|
||||
|
|
|
@ -15,7 +15,7 @@ import * as _ from 'lodash';
|
|||
import { EventEmitter, Event } from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.loadMessageBundle(__filename);
|
||||
const localize = nls.loadMessageBundle();
|
||||
const readdir = denodeify(fs.readdir);
|
||||
const readfile = denodeify<string, string, string>(fs.readFile);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import { GitContentProvider } from './contentProvider';
|
|||
import { AutoFetcher } from './autofetch';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
nls.config();
|
||||
const localize = nls.config()();
|
||||
|
||||
async function init(disposables: Disposable[]): Promise<void> {
|
||||
const rootPath = workspace.rootPath;
|
||||
|
@ -36,8 +36,8 @@ async function init(disposables: Disposable[]): Promise<void> {
|
|||
const repositoryRoot = await repository.getRoot();
|
||||
const model = new Model(repositoryRoot, repository, onWorkspaceChange);
|
||||
|
||||
const outputChannel = window.createOutputChannel('git');
|
||||
outputChannel.appendLine(`Using git ${info.version} from ${info.path}`);
|
||||
const outputChannel = window.createOutputChannel('Git');
|
||||
outputChannel.appendLine(localize('using git', "Using git {0} from {1}", info.version, info.path));
|
||||
git.onOutput(str => outputChannel.append(str), null, disposables);
|
||||
|
||||
const commandCenter = new CommandCenter(model, outputChannel);
|
||||
|
|
|
@ -11,7 +11,9 @@ import { throttle, anyEvent, eventToPromise, filterEvent, mapEvent } from './uti
|
|||
import { watch } from './watch';
|
||||
import { decorate, memoize, debounce } from 'core-decorators';
|
||||
import * as path from 'path';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
const iconsRootPath = path.join(path.dirname(__dirname), 'resources', 'icons');
|
||||
|
||||
function getIconUri(iconName: string, theme: string): Uri {
|
||||
|
@ -129,7 +131,7 @@ export class MergeGroup extends ResourceGroup {
|
|||
static readonly ID = 'merge';
|
||||
|
||||
constructor(resources: Resource[]) {
|
||||
super(MergeGroup.ID, 'Merge Changes', resources);
|
||||
super(MergeGroup.ID, localize('merge changes', "Merge Changes"), resources);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,7 +140,7 @@ export class IndexGroup extends ResourceGroup {
|
|||
static readonly ID = 'index';
|
||||
|
||||
constructor(resources: Resource[]) {
|
||||
super(IndexGroup.ID, 'Staged Changes', resources);
|
||||
super(IndexGroup.ID, localize('staged changes', "Staged Changes"), resources);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +149,7 @@ export class WorkingTreeGroup extends ResourceGroup {
|
|||
static readonly ID = 'workingTree';
|
||||
|
||||
constructor(resources: Resource[]) {
|
||||
super(WorkingTreeGroup.ID, 'Changes', resources);
|
||||
super(WorkingTreeGroup.ID, localize('changes', "Changes"), resources);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
import { window, Disposable, StatusBarItem, StatusBarAlignment } from 'vscode';
|
||||
import { RefType, IBranch } from './git';
|
||||
import { Model, Operation } from './model';
|
||||
import * as nls from 'vscode-nls';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export class CheckoutStatusBar {
|
||||
|
||||
|
@ -116,11 +119,11 @@ export class SyncStatusBar {
|
|||
text += `${HEAD.behind}↓ ${HEAD.ahead}↑`;
|
||||
}
|
||||
command = 'git.sync';
|
||||
tooltip = 'Synchronize changes';
|
||||
tooltip = localize('sync changes', "Synchronize changes");
|
||||
} else {
|
||||
icon = '$(cloud-upload)';
|
||||
command = 'git.publish';
|
||||
tooltip = 'Publish changes';
|
||||
tooltip = localize('publish changes', "Publish changes");
|
||||
}
|
||||
} else {
|
||||
command = '';
|
||||
|
@ -130,7 +133,7 @@ export class SyncStatusBar {
|
|||
if (this.state.isSyncRunning) {
|
||||
text = '';
|
||||
command = '';
|
||||
tooltip = 'Synchronizing changes...';
|
||||
tooltip = localize('syncing changes', "Synchronizing changes...");
|
||||
}
|
||||
|
||||
this.raw.text = [icon, text].join(' ').trim();
|
||||
|
|
Loading…
Reference in a new issue