Skip to content

feat: added translations #846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/node_modules
/out
/test-reports
svn-scm*.vsix
svn-scm*.vsix
package.nls.*.json
75 changes: 75 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
const gulp = require('gulp');
const path = require('path');
const ts = require('gulp-typescript');
const typescript = require('typescript');
const sourcemaps = require('gulp-sourcemaps');
const del = require('del');
const es = require('event-stream');
const vsce = require('vsce');
const nls = require('vscode-nls-dev');

const tsProject = ts.createProject('./tsconfig.json', {typescript});

const inlineMap = true;
const inlineSource = false;
const outDest = 'out';

const languages = [
{ folderName: 'zh-CN', id: 'zh-CN' },
{ folderName: 'pt-br', id: 'pt-br' },
{ folderName: 'ru', id: 'ru' }
];

const cleanTask = function() {
return del(['out/**', 'package.nls.*.json', '*.vsix']);
}

const internalCompileTask = function() {
return doCompile(false);
}

const internalNlsCompileTask = function() {
return doCompile(true);
}

const addI18nTask = function() {
return gulp.src(['package.nls.json'])
.pipe(nls.createAdditionalLanguageFiles(languages, 'i18n'))
.pipe(gulp.dest('.'));
}

const buildTask = gulp.series(cleanTask, internalNlsCompileTask, addI18nTask);

const doCompile = function(buildNls) {
var r = tsProject.src()
.pipe(sourcemaps.init())
.pipe(tsProject()).js
.pipe(buildNls ? nls.rewriteLocalizeCalls() : es.through())
.pipe(buildNls ? nls.createAdditionalLanguageFiles(languages, 'i18n', 'out') : es.through());

if (inlineMap && inlineSource) {
r = r.pipe(sourcemaps.write());
} else {
r = r.pipe(sourcemaps.write("../out", {
includeContent: inlineSource,
sourceRoot: "../src"
}));
}

return r.pipe(gulp.dest(outDest));
}

const vscePublishTask = function() {
return vsce.publish();
}

const vscePackageTask = function() {
return vsce.createVSIX();
}

gulp.task('default', buildTask);
gulp.task('clean', cleanTask);
gulp.task('compile', gulp.series(cleanTask, internalCompileTask));
gulp.task('build', buildTask);
gulp.task('publish', gulp.series(buildTask, vscePublishTask));
gulp.task('package', gulp.series(buildTask, vscePackageTask));
10 changes: 10 additions & 0 deletions i18n/pt-br/out/changelistItems.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changelistItems.select_changelist_new": "Select an existing changelist or create a new",
"changelistItems.changelist_name": "Changelist name",
"changelistItems.changelist_enter_name": "Please enter a changelist name",
"changelistItems.no_changes_commit": "There are no changes to commit.",
"changelistItems.select_changelist_commit": "Select a changelist to commit",
"changelistItems.select_files_commit": "Select files to commit",
"changelistItems.no_changelists_pick": "No changelists to pick from",
"changelistItems.select_changelist": "Select a changelist"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/add.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"add.unable_to_add_file": "Unable to add file"
}
8 changes: 8 additions & 0 deletions i18n/pt-br/out/commands/changeList.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"changeList.no_version_control": "Files are not under version control and cannot be added to a change list",
"changeList.diff_repo_error": "Unable to add files from different repositories to change list",
"changeList.some_files_untracked": "Some Files are not under version control and cannot be added to a change list",
"changeList.unable_to_remove_file": "Unable to remove file \"{0}\" from changelist",
"changeList.added_files": "Added files \"{0}\" to changelist \"{1}\"",
"changeList.unable_to_add_file": "Unable to add file \"{0}\" to changelist \"{1}\""
}
10 changes: 10 additions & 0 deletions i18n/pt-br/out/commands/checkout.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"checkout.repo_url": "Repository URL",
"checkout.select_repo_location": "Select Repository Location",
"checkout.folder_name": "Folder name",
"checkout.checkout_repo": "Checkout svn repository '{0}'...",
"checkout.open_checked_out": "Would you like to open the checked out repository?",
"checkout.open_repo": "Open Repository",
"checkout.add_to_workspace": "Add to Workspace",
"checkout.open_or_checkout": "Would you like to open the checked out repository, or add it to the current workspace?"
}
5 changes: 5 additions & 0 deletions i18n/pt-br/out/commands/command.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"command.unable_to_patch": "Unable to patch",
"command.file_ignored": "File(s) is now being ignored",
"command.unable_to_ignore": "Unable to set property ignore"
}
5 changes: 5 additions & 0 deletions i18n/pt-br/out/commands/deleteUnversioned.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"deleteUnversioned.delete_selected": "Would you like to delete selected files?",
"deleteUnvirsioned.yes": "Yes",
"deleteUnvirsioned.no": "No"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/log.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"log.unable_to_log": "Unable to log"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/openHeadFile.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"openHeadFile.version_unavailable": "HEAD version of '{0}' is not available."
}
6 changes: 6 additions & 0 deletions i18n/pt-br/out/commands/promptAuth.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"promptAuth.username_placeholder": "Svn repository username",
"promptAuth.username_prompt": "Please enter your username",
"promptAuth.password_placeholder": "Svn repository password",
"promptAuth.password_prompt": "Please enter your password"
}
6 changes: 6 additions & 0 deletions i18n/pt-br/out/commands/promptRemove.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"promptRemove.add_to_ignore": "Add to ignored list",
"promptRemove.remove_from_svn": "The file(s) \"{0}\" are removed from disk.\nWould you like remove from SVN?",
"promptRemove.yes": "Yes",
"promptRemove.no": "No"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/pullIncomingChange.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pullIncomingChange.unable_to_update": "Unable to update"
}
6 changes: 6 additions & 0 deletions i18n/pt-br/out/commands/remove.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"remove.keep_local_copy": "Would you like to keep a local copy of the files?",
"remove.yes": "Yes",
"remove.no": "No",
"remove.unable_to_remove": "Unable to remove files"
}
5 changes: 5 additions & 0 deletions i18n/pt-br/out/commands/removeUnversioned.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"removeUnversioned.remove_all": "Are you sure? This will remove all unversioned files except for ignored.",
"removeUnversioned.yes": "Yes",
"removeUnversioned.no": "No"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/renameExplorer.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"renameExplorer.new_name": "New name name for {0}"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/resolve.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"resolve.select_option": "Select conflict option"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/resolveAll.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"resolveAll.select_option": "Select conflict option for {0}"
}
5 changes: 5 additions & 0 deletions i18n/pt-br/out/commands/resolved.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"resolved.mark_resolved": "Mark the conflict as resolved for '{0}'",
"resolved.yes": "Yes",
"resolved.no": "No"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/revert.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"revert.unable_to_revert": "Unable to revert"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/revertAll.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"revertAll.unable_to_revert": "Unable to revert"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/revertExplorer.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"revertExplorer.unable_to_revert": "Unable to revert"
}
5 changes: 5 additions & 0 deletions i18n/pt-br/out/commands/search_log_by_revision.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"searchRevision.revision": "Revision?",
"searchRevision.invalid_revision": "Invalid revision",
"searchRevision.unable_to_log": "Unable to log"
}
4 changes: 4 additions & 0 deletions i18n/pt-br/out/commands/search_log_by_text.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"searchText.search_query": "Search query",
"searchText.searching": "Searching Log"
}
9 changes: 9 additions & 0 deletions i18n/pt-br/out/commands/switchBranch.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"switchBranch.create_new": "Created new branch {0}",
"switchBranch.commit_message": "Commit message for create branch {0}",
"switchBranch.ancestor_error": "Seems like these branches don't have a common ancestor. Do you want to retry with '--ignore-ancestry' option?",
"switchBranch.yes": "Yes",
"switchBranch.no": "No",
"switchBranch.unable_to_create": "Unable to create new branch",
"switchBranch.unable_to_switch": "Unable to switch branch"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/commands/updaye.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"update.unable": "Unable to update"
}
8 changes: 8 additions & 0 deletions i18n/pt-br/out/commands/upgrade.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"upgrade.yes": "Yes",
"upgrade.no": "No",
"upgrade.dont_show_again": "Don't Show Again",
"upgrade.upgrade_working_copy": "You want upgrade the working copy (svn upgrade)?",
"upgrade.working_copy_upgraded": "Working copy '{0}' upgraded",
"upgrade.upgrade_error": "Error on upgrading working copy '{0}'. See log for more detail"
}
14 changes: 14 additions & 0 deletions i18n/pt-br/out/conflictItems.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"conflictItems.base": "base",
"conflictItems.base.description": "Choose the file that was the (unmodified) BASE revision before you tried to integrate changes",
"conflictItems.working": "working",
"conflictItems.working.description": "Assuming that you've manually handled the conflict resolution, choose the version of the file as it currently stands in your working copy.",
"conflictItems.mine_full": "mine-full",
"conflictItems.mine_full.description": "Preserve all local modifications and discarding all changes fetched",
"conflictItems.theirs_full": "theirs-full",
"conflictItems.theirs_full.description": "Discard all local modifications and integrating all changes fetched",
"conflictItems.mine_conflict": "mine-conflict",
"conflictItems.mine_conflict.description": "Resolve conflicted files by preferring local modifications over the changes fetched",
"conflictItems.theirs_conflict": "theirs-conflict",
"conflictItems.theirs_conflict.description": "Resolve conflicted files by preferring the changes fetched from the server over local modifications"
}
8 changes: 8 additions & 0 deletions i18n/pt-br/out/extension.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extension.using_svn": "Using svn \"{0}\" from \"{1}\"",
"extension.find_svn_executable": "Find SVN executable",
"extension.svn_download": "Download SVN",
"extension.svn_dont_show": "Don't Show Again",
"extension.svn_not_found": "SVN not found. Install it or configure it using the 'svn.path' setting.",
"extension.update_path": "Updated \"svn.path\" with \"{0}\""
}
4 changes: 4 additions & 0 deletions i18n/pt-br/out/helpers/branch.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"branch.checking_remote": "Checking remote branches",
"branch.name": "Please provide a branch name"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/historyView/branchChangesProvider.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bcp.open_diff": "Open diff"
}
8 changes: 8 additions & 0 deletions i18n/pt-br/out/historyView/common.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"common.clipboard_supported": "Clipboard is supported in VS Code 1.30 and newer",
"common.log_entries_dont_exist": "Log entries above do not exist in working copy",
"common.no_working_copy_path": "No working copy for this path",
"common.not_avaialbe_from_copy": "Not available from this working copy: {0}",
"common.not_a_file": "This target is not a file",
"common.failed_open_path": "Failed to open path"
}
10 changes: 10 additions & 0 deletions i18n/pt-br/out/messages.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"messages.no_change_to_commit": "There are no changes to commit.",
"messages.commit_message": "Commit Message",
"messages.pick_prev_commit": "Pick a previous commit message",
"messages.enter_commit": "Message (press Ctrl+Enter to commit)",
"messages.commit": "Commit",
"messages.cancel": "Cancel",
"messages.check_empty_commit": "Do you really want to commit an empty message?",
"messages.yes": "Yes"
}
9 changes: 9 additions & 0 deletions i18n/pt-br/out/repository.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"repository.inputbox_placeholder": "Message (press Ctrl+Enter to commit)",
"repository.changes": "changes",
"repository.conflicts": "Conflicts",
"repository.unversioned": "Unversioned",
"repository.changelist": "Changelist {0}",
"repository.remote_changes": "Remote Changes",
"repository.create_new_branch": "Created new branch"
}
6 changes: 6 additions & 0 deletions i18n/pt-br/out/resource.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"resource.open_diff_head": "Open Diff With Head",
"resource.open_diff_base": "Open Diff With Base",
"resource.renamed_from": "Renamed from {0}",
"resource.property": "Property {0}"
}
3 changes: 3 additions & 0 deletions i18n/pt-br/out/source_control_manager.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"scm.choose_repo": "Choose a repository"
}
4 changes: 4 additions & 0 deletions i18n/pt-br/out/svn.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"svn.failed_to_execute_svn_enoent": "Failed to execute svn (ENOENT)",
"svn.failed_to_execute": "Failed to execute svn"
}
Loading