Commit 2a08d696 authored by 神楽坂玲奈's avatar 神楽坂玲奈

i18n

parent 63c630a6
/bin/ /bin/
/app/*.js /app/*.js
/app/*.js.map /app/*.js.map
/app/*.metadata.json
/node_modules/ /node_modules/
/dist/ /dist/
/cache/ /cache/
......
This diff is collapsed.
...@@ -4,18 +4,18 @@ import {InstallConfig} from "./install-config"; ...@@ -4,18 +4,18 @@ import {InstallConfig} from "./install-config";
import {SettingsService} from "./settings.sevices"; import {SettingsService} from "./settings.sevices";
import {App} from "./app"; import {App} from "./app";
import {DownloadService} from "./download.service"; import {DownloadService} from "./download.service";
import {clipboard, remote, ipcRenderer} from "electron"; import {clipboard, remote} from "electron";
import * as path from "path"; import * as path from "path";
import * as child_process from "child_process";
import {InstallService} from "./install.service"; import {InstallService} from "./install.service";
declare var Notification; declare var Notification;
declare var $; declare var $;
@Component({ @Component({
moduleId: module.id,
selector: 'app-detail', selector: 'app-detail',
templateUrl: 'app/app-detail.component.html', templateUrl: 'app-detail.component.html',
styleUrls: ['app/app-detail.component.css'], styleUrls: ['app-detail.component.css'],
}) })
export class AppDetailComponent implements OnInit { export class AppDetailComponent implements OnInit {
@Input() @Input()
......
...@@ -9,7 +9,6 @@ import {remote} from "electron"; ...@@ -9,7 +9,6 @@ import {remote} from "electron";
import "rxjs/Rx"; import "rxjs/Rx";
import {AppLocal} from "./app-local"; import {AppLocal} from "./app-local";
import * as ini from "ini"; import * as ini from "ini";
import {platform} from "os";
const Aria2 = require('aria2'); const Aria2 = require('aria2');
const sudo = require('electron-sudo'); const sudo = require('electron-sudo');
......
/** /**
* Created by zh99998 on 16/9/2. * Created by zh99998 on 16/9/2.
*/ */
import {Component} from "@angular/core"; import {Component} from "@angular/core";
@Component({ @Component({
moduleId: module.id,
selector: 'community', selector: 'community',
templateUrl: 'app/community.component.html', templateUrl: 'community.component.html',
styleUrls: ['app/community.component.css'], styleUrls: ['community.component.css'],
}) })
export class CommunityComponent { export class CommunityComponent {
} }
/** /**
* Created by weijian on 2016/10/26. * Created by weijian on 2016/10/26.
*/ */
import {Injectable, NgZone} from "@angular/core"; import {Injectable, NgZone} from "@angular/core";
import {Http} from "@angular/http"; import {Http} from "@angular/http";
import {Observable} from "rxjs/Observable"; import {Observable} from "rxjs/Observable";
......
import {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID} from "@angular/core";
import {remote} from "electron";
export async function getTranslationProviders(): Promise<Object[]> {
let locale = localStorage.getItem('locale');
if (!locale) {
locale = remote.app.getLocale();
localStorage.setItem('locale', locale);
}
const noProviders: Object[] = [];
if (!locale || locale === 'zh-CN') {
return noProviders;
}
const translationFile = `./locale/messages.${locale}.xlf`;
try {
let translations = await getTranslationsWithSystemJs(translationFile);
return [
{provide: TRANSLATIONS, useValue: translations},
{provide: TRANSLATIONS_FORMAT, useValue: 'xlf'},
{provide: LOCALE_ID, useValue: locale}
]
} catch (error) {
return noProviders
}
}
declare var System: any;
function getTranslationsWithSystemJs(file: string) {
return System.import(file + '!text'); // relies on text plugin
}
/** /**
* Created by weijian on 2016/11/2. * Created by weijian on 2016/11/2.
*/ */
import {Injectable} from "@angular/core"; import {Injectable} from "@angular/core";
import {App} from "./app"; import {App} from "./app";
import {InstallConfig} from "./install-config"; import {InstallConfig} from "./install-config";
...@@ -9,12 +8,12 @@ import * as path from "path"; ...@@ -9,12 +8,12 @@ import * as path from "path";
import * as child_process from "child_process"; import * as child_process from "child_process";
import * as mkdirp from "mkdirp"; import * as mkdirp from "mkdirp";
import * as readline from "readline"; import * as readline from "readline";
import * as fs from 'fs'; import * as fs from "fs";
import {EventEmitter} from "events"; import {EventEmitter} from "events";
import {AppLocal} from "./app-local"; import {AppLocal} from "./app-local";
import {Http} from "@angular/http"; import {Http} from "@angular/http";
import ReadableStream = NodeJS.ReadableStream;
import {AppsService} from "./apps.service"; import {AppsService} from "./apps.service";
import ReadableStream = NodeJS.ReadableStream;
@Injectable() @Injectable()
export class InstallService { export class InstallService {
...@@ -36,29 +35,29 @@ export class InstallService { ...@@ -36,29 +35,29 @@ export class InstallService {
createDirectory(dir: string) { createDirectory(dir: string) {
return new Promise((resolve, reject)=> { return new Promise((resolve, reject) => {
mkdirp(dir, resolve); mkdirp(dir, resolve);
}) })
} }
getComplete(app: App): Promise<App> { getComplete(app: App): Promise<App> {
return new Promise((resolve, reject)=> { return new Promise((resolve, reject) => {
this.eventEmitter.once(app.id, (complete)=> { this.eventEmitter.once(app.id, (complete) => {
resolve(); resolve();
}); });
}); });
} }
extract(file: string, destPath: string) { extract(file: string, destPath: string) {
return new Promise((resolve, reject)=> { return new Promise((resolve, reject) => {
let tarProcess = child_process.spawn(this.tarPath, ['xvf', file, '-C', destPath]); let tarProcess = child_process.spawn(this.tarPath, ['xvf', file, '-C', destPath]);
let rl = readline.createInterface({ let rl = readline.createInterface({
input: <ReadableStream>tarProcess.stderr, input: <ReadableStream>tarProcess.stderr,
}); });
rl.on('line', (input)=> { rl.on('line', (input) => {
console.log(input); console.log(input);
}); });
tarProcess.on('exit', (code)=> { tarProcess.on('exit', (code) => {
if (code === 0) { if (code === 0) {
resolve(); resolve();
} else { } else {
...@@ -72,26 +71,26 @@ export class InstallService { ...@@ -72,26 +71,26 @@ export class InstallService {
let action = app.actions.get('install'); let action = app.actions.get('install');
if (action) { if (action) {
let env = Object.assign({}, action.env); let env = Object.assign({}, action.env);
let command:string[] = []; let command: string[] = [];
command.push(path.join(appPath, action.execute)); command.push(path.join(appPath, action.execute));
command.push(...action.args); command.push(...action.args);
let open = action.open; let open = action.open;
if (open) { if (open) {
let openAction:any = open.actions.get("main"); let openAction: any = open.actions.get("main");
env = Object.assign(env, openAction.env); env = Object.assign(env, openAction.env);
command.unshift(...openAction.args); command.unshift(...openAction.args);
command.unshift(path.join((<AppLocal>open.local).path, openAction.execute)); command.unshift(path.join((<AppLocal>open.local).path, openAction.execute));
} }
return new Promise((resolve, reject)=> { return new Promise((resolve, reject) => {
let child = child_process.spawn(<string>command.shift(), command, { let child = child_process.spawn(<string>command.shift(), command, {
env: env, env: env,
stdio: 'inherit', stdio: 'inherit',
shell: true, shell: true,
}); });
child.on('error', (error)=> { child.on('error', (error) => {
console.log(error); console.log(error);
}); });
child.on('exit', (code)=> { child.on('exit', (code) => {
if (code === 0) { if (code === 0) {
resolve(); resolve();
} else { } else {
...@@ -112,7 +111,7 @@ export class InstallService { ...@@ -112,7 +111,7 @@ export class InstallService {
let backupPath = path.join((<AppLocal>app.local).path, "backup"); let backupPath = path.join((<AppLocal>app.local).path, "backup");
await this.createDirectory(backupPath); await this.createDirectory(backupPath);
for (let file of files) { for (let file of files) {
await new Promise((resolve, reject)=> { await new Promise((resolve, reject) => {
let oldPath = path.join((<AppLocal>app.local).path, file); let oldPath = path.join((<AppLocal>app.local).path, file);
let newPath = path.join(backupPath, file); let newPath = path.join(backupPath, file);
fs.rename(oldPath, newPath, resolve); fs.rename(oldPath, newPath, resolve);
...@@ -126,7 +125,7 @@ export class InstallService { ...@@ -126,7 +125,7 @@ export class InstallService {
checksumUrl = this.checksumUri + app.id + "-" + process.platform; checksumUrl = this.checksumUri + app.id + "-" + process.platform;
} }
let checksumMap: Map<string,string> = await this.http.get(checksumUrl) let checksumMap: Map<string,string> = await this.http.get(checksumUrl)
.map((response)=> { .map((response) => {
let map = new Map<string,string>(); let map = new Map<string,string>();
for (let line of response.text().split('\n')) { for (let line of response.text().split('\n')) {
if (line !== "") { if (line !== "") {
...@@ -142,7 +141,7 @@ export class InstallService { ...@@ -142,7 +141,7 @@ export class InstallService {
async doInstall() { async doInstall() {
for (let app of this.installQueue.keys()) { for (let app of this.installQueue.keys()) {
let depInstalled = app.findDependencies() let depInstalled = app.findDependencies()
.every((dependency)=>dependency.isInstalled()); .every((dependency) => dependency.isInstalled());
if (depInstalled && !this.installingQueue.has(app)) { if (depInstalled && !this.installingQueue.has(app)) {
this.installingQueue.add(app); this.installingQueue.add(app);
let options = <InstallConfig>this.installQueue.get(app); let options = <InstallConfig>this.installQueue.get(app);
...@@ -194,15 +193,15 @@ export class InstallService { ...@@ -194,15 +193,15 @@ export class InstallService {
} }
deleteFile(file: string): Promise<string> { deleteFile(file: string): Promise<string> {
return new Promise((resolve, reject)=> { return new Promise((resolve, reject) => {
fs.lstat(file, (err, stats)=> { fs.lstat(file, (err, stats) => {
if (err) return resolve(path); if (err) return resolve(path);
if (stats.isDirectory()) { if (stats.isDirectory()) {
fs.rmdir(file, (err)=> { fs.rmdir(file, (err) => {
resolve(file); resolve(file);
}); });
} else { } else {
fs.unlink(file, (err)=> { fs.unlink(file, (err) => {
resolve(file); resolve(file);
}); });
} }
...@@ -229,7 +228,7 @@ export class InstallService { ...@@ -229,7 +228,7 @@ export class InstallService {
await this.deleteFile(oldFile); await this.deleteFile(oldFile);
if (app.parent) { if (app.parent) {
let backFile = path.join((<AppLocal>app.local).path, "backup", file); let backFile = path.join((<AppLocal>app.local).path, "backup", file);
await new Promise((resolve, reject)=> { await new Promise((resolve, reject) => {
fs.rename(backFile, oldFile, resolve); fs.rename(backFile, oldFile, resolve);
}); });
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
flex-shrink: 0; flex-shrink: 0;
} }
#apps{ #apps {
/*background-color: darkslategray;*/ /*background-color: darkslategray;*/
width: 280px; width: 280px;
flex-shrink: 0; flex-shrink: 0;
......
...@@ -3,21 +3,21 @@ ...@@ -3,21 +3,21 @@
*/ */
import {Component, OnInit, ElementRef, ViewChild} from "@angular/core"; import {Component, OnInit, ElementRef, ViewChild} from "@angular/core";
import {AppsService} from "./apps.service"; import {AppsService} from "./apps.service";
import {LoginService, User} from "./login.service"; import {LoginService} from "./login.service";
import {App, Category} from "./app"; import {App, Category} from "./app";
import {DownloadService} from "./download.service"; import {DownloadService} from "./download.service";
import {InstallService} from "./install.service"; import {InstallService} from "./install.service";
import {Http, URLSearchParams} from "@angular/http"; import {Http, URLSearchParams} from "@angular/http";
import * as path from 'path'; import * as path from "path";
import {InstallConfig} from "./install-config"; import {InstallConfig} from "./install-config";
import {AppLocal} from "./app-local"; import {AppLocal} from "./app-local";
import {UrlResolver} from "@angular/compiler";
import WebViewElement = Electron.WebViewElement; import WebViewElement = Electron.WebViewElement;
@Component({ @Component({
moduleId: module.id,
selector: 'lobby', selector: 'lobby',
templateUrl: 'app/lobby.component.html', templateUrl: 'lobby.component.html',
styleUrls: ['app/lobby.component.css'], styleUrls: ['lobby.component.css'],
}) })
export class LobbyComponent implements OnInit { export class LobbyComponent implements OnInit {
......
...@@ -8,9 +8,10 @@ import * as querystring from "querystring"; ...@@ -8,9 +8,10 @@ import * as querystring from "querystring";
import * as url from "url"; import * as url from "url";
@Component({ @Component({
moduleId: module.id,
selector: 'login', selector: 'login',
templateUrl: 'app/login.component.html', templateUrl: 'login.component.html',
styleUrls: ['app/login.component.css'], styleUrls: ['login.component.css'],
}) })
export class LoginComponent { export class LoginComponent {
url; url;
......
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic"; import {platformBrowserDynamic} from "@angular/platform-browser-dynamic";
import {getTranslationProviders} from "./i18n-providers";
import {MyCard} from "./mycard.module"; import {MyCard} from "./mycard.module";
//enableProdMode(); //enableProdMode();
platformBrowserDynamic().bootstrapModule(MyCard); getTranslationProviders().then(providers => {
const options = {providers};
platformBrowserDynamic().bootstrapModule(MyCard, options);
});
...@@ -10,17 +10,17 @@ ...@@ -10,17 +10,17 @@
</li> </li>
--> -->
<li *ngIf="loginService.logged_in" [ngClass]="{active: currentPage === 'lobby'}" class="nav-item"> <li *ngIf="loginService.logged_in" [ngClass]="{active: currentPage === 'lobby'}" class="nav-item">
<a (click)="currentPage='lobby'" class="nav-link" href="#">{{'library'| translate}}<span class="sr-only">(current)</span></a> <a i18n (click)="currentPage='lobby'" class="nav-link" href="#">游戏</a>
</li> </li>
<li *ngIf="loginService.logged_in" [ngClass]="{active: currentPage === 'community'}" class="nav-item"> <li *ngIf="loginService.logged_in" [ngClass]="{active: currentPage === 'community'}" class="nav-item">
<a (click)="currentPage='community'" class="nav-link" href="#">{{'community'| translate}}</a> <a i18n (click)="currentPage='community'" class="nav-link" href="#">社区</a>
</li> </li>
</ul> </ul>
<div class="navbar-right"> <div class="navbar-right">
<div id="user" *ngIf="loginService.logged_in"> <div id="user" *ngIf="loginService.logged_in">
<a href="#" class="profile"><img id="avatar" [src]="loginService.user.avatar_url" alt="image"></a> <a href="#" class="profile"><img id="avatar" [src]="loginService.user.avatar_url" alt="image"></a>
<a href="#" class="profile item" id="username">{{loginService.user.username}}</a> <a href="#" class="profile item" id="username">{{loginService.user.username}}</a>
<a href="#" (click)="loginService.logout()" class="item">切换账号</a> <a i18n href="#" (click)="loginService.logout()" class="item">切换账号</a>
</div> </div>
<div id="window-buttons" *ngIf="platform != 'darwin'"> <div id="window-buttons" *ngIf="platform != 'darwin'">
<i (click)="currentWindow.minimize()" class="fa fa-minus"></i> <i (click)="currentWindow.minimize()" class="fa fa-minus"></i>
...@@ -33,5 +33,4 @@ ...@@ -33,5 +33,4 @@
<login class="page" *ngIf="!loginService.logged_in"></login> <login class="page" *ngIf="!loginService.logged_in"></login>
<store class="page" *ngIf="loginService.logged_in" [hidden]="currentPage != 'store'"></store> <store class="page" *ngIf="loginService.logged_in" [hidden]="currentPage != 'store'"></store>
<lobby class="page" *ngIf="loginService.logged_in" [hidden]="currentPage != 'lobby'"></lobby> <lobby class="page" *ngIf="loginService.logged_in" [hidden]="currentPage != 'lobby'"></lobby>
<webview class="page" *ngIf="loginService.logged_in" [hidden]="currentPage != 'community'" <webview class="page" *ngIf="loginService.logged_in" [hidden]="currentPage != 'community'" src="https://ygobbs.com"></webview>
src="https://ygobbs.com"></webview> \ No newline at end of file
\ No newline at end of file
import {Component, Renderer, ChangeDetectorRef, OnInit} from "@angular/core"; import {Component, Renderer, ChangeDetectorRef, OnInit} from "@angular/core";
import {TranslateService} from "ng2-translate"; import {remote} from "electron";
import {ipcRenderer, remote} from "electron";
import {LoginService} from "./login.service"; import {LoginService} from "./login.service";
const autoUpdater: Electron.AutoUpdater = remote.getGlobal('autoUpdater'); const autoUpdater: Electron.AutoUpdater = remote.getGlobal('autoUpdater');
@Component({ @Component({
moduleId: module.id,
selector: 'mycard', selector: 'mycard',
templateUrl: 'app/mycard.component.html', templateUrl: 'mycard.component.html',
styleUrls: ['app/mycard.component.css'], styleUrls: ['mycard.component.css'],
}) })
...@@ -23,17 +23,11 @@ export class MyCardComponent implements OnInit { ...@@ -23,17 +23,11 @@ export class MyCardComponent implements OnInit {
} }
constructor(private renderer: Renderer, private translate: TranslateService, private loginService: LoginService, private ref: ChangeDetectorRef) { constructor(private renderer: Renderer, private loginService: LoginService, private ref: ChangeDetectorRef) {
renderer.listenGlobal('window', 'message', (event) => { // renderer.listenGlobal('window', 'message', (event) => {
console.log(event); // console.log(event);
// Do something with 'event' // // Do something with 'event'
}); // });
// this language will be used as a fallback when a translation isn't found in the current language
translate.setDefaultLang('en-US');
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(remote.app.getLocale());
this.currentWindow.on('maximize', () => ref.detectChanges()); this.currentWindow.on('maximize', () => ref.detectChanges());
this.currentWindow.on('unmaximize', () => ref.detectChanges()); this.currentWindow.on('unmaximize', () => ref.detectChanges());
......
...@@ -11,14 +11,13 @@ import {RosterComponent} from "./roster.component"; ...@@ -11,14 +11,13 @@ import {RosterComponent} from "./roster.component";
import {CommunityComponent} from "./community.component"; import {CommunityComponent} from "./community.component";
import {YGOProComponent} from "./ygopro.component"; import {YGOProComponent} from "./ygopro.component";
import {AppsService} from "./apps.service"; import {AppsService} from "./apps.service";
import {TranslateModule} from "ng2-translate";
import {SettingsService} from "./settings.sevices"; import {SettingsService} from "./settings.sevices";
import {LoginService} from "./login.service"; import {LoginService} from "./login.service";
import {DownloadService} from "./download.service"; import {DownloadService} from "./download.service";
import {InstallService} from "./install.service"; import {InstallService} from "./install.service";
@NgModule({ @NgModule({
imports: [BrowserModule, FormsModule, ReactiveFormsModule, HttpModule, TranslateModule.forRoot()], imports: [BrowserModule, FormsModule, ReactiveFormsModule, HttpModule],
declarations: [ declarations: [
MyCardComponent, LoginComponent, StoreComponent, LobbyComponent, MyCardComponent, LoginComponent, StoreComponent, LobbyComponent,
CommunityComponent, AppDetailComponent, RosterComponent, YGOProComponent, CommunityComponent, AppDetailComponent, RosterComponent, YGOProComponent,
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
*/ */
import {Component} from "@angular/core"; import {Component} from "@angular/core";
@Component({ @Component({
moduleId: module.id,
selector: 'roster', selector: 'roster',
templateUrl: 'app/roster.component.html', templateUrl: 'roster.component.html',
styleUrls: ['app/roster.component.css'], styleUrls: ['roster.component.css'],
}) })
export class RosterComponent { export class RosterComponent {
} }
/** /**
* Created by weijian on 2016/10/24. * Created by weijian on 2016/10/24.
*/ */
import {Injectable} from "@angular/core"; import {Injectable} from "@angular/core";
import {remote} from "electron"; import {remote} from "electron";
import * as path from "path"; import * as path from "path";
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
*/ */
import {Component} from "@angular/core"; import {Component} from "@angular/core";
@Component({ @Component({
moduleId: module.id,
selector: 'store', selector: 'store',
templateUrl: 'app/store.component.html', templateUrl: 'store.component.html',
styleUrls: ['app/store.component.css'], styleUrls: ['store.component.css'],
}) })
export class StoreComponent { export class StoreComponent {
} }
...@@ -67,9 +67,10 @@ interface Room { ...@@ -67,9 +67,10 @@ interface Room {
} }
@Component({ @Component({
moduleId: module.id,
selector: 'ygopro', selector: 'ygopro',
templateUrl: 'app/ygopro.component.html', templateUrl: 'ygopro.component.html',
styleUrls: ['app/ygopro.component.css'], styleUrls: ['ygopro.component.css'],
}) })
export class YGOProComponent implements OnInit { export class YGOProComponent implements OnInit {
@Input() @Input()
......
{
"library": "游戏",
"community": "社区",
"settings": "设置",
"cancel": "取消",
"install": "安装",
"uninstall": "卸载",
"mods":"附加模块",
"general": "常规",
"updates": "更新",
"local files": "本地文件",
"uninstall confirm": "这将删除所有本地内容,确认执行?",
"browse": "浏览",
"install_path": "安装路径",
"shortcut": "快捷方式",
"create_shortcut": "创建应用程序快捷方式",
"create_desktop_shortcut": "创建桌面快捷方式",
"additions": "附加内容"
}
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<!-- 2. Configure SystemJS --> <!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script> <script src="systemjs.config.js"></script>
<script> <script>
document.locale = require('electron').remote.app.getLocale();
System.import('app') System.import('app')
</script> </script>
</head> </head>
......
<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="zh-CN" datatype="plaintext" original="ng2.template">
<body>
<trans-unit id="a8cae935472a05e1c8c9be436bb7b1bdea96a54a" datatype="html">
<source>安装</source>
<target>Install</target>
</trans-unit>
<trans-unit id="e6194d8a9c8da57b667847cd80f1da563f2c2b1e" datatype="html">
<source>导入</source>
<target>Import</target>
</trans-unit>
<trans-unit id="2fe99d94b20d6f8aba7814d8657037ec9d69d36c" datatype="html">
<source>正在安装...</source>
<target>Installing...</target>
</trans-unit>
<trans-unit id="e5ee7e692c816893b6fd2f9375e6d8303cd794cd" datatype="html">
<source>等待安装...</source>
<target>Pending...</target>
</trans-unit>
<trans-unit id="d3852e0147360b29d0d6076e95dd1ad0098a60db" datatype="html">
<source>运行</source>
<target>Start</target>
</trans-unit>
<trans-unit id="67adbad4f646bb8e1c440522bafea8fe5f7e6bfd" datatype="html">
<source>设置</source>
<target>Custom</target>
</trans-unit>
<trans-unit id="3d6cad40e26f99e39bc6f5925a890ba83b67ce5b" datatype="html">
<source>联机</source>
<target>Networking</target>
</trans-unit>
<trans-unit id="5eadb60473a54773298ee679a4ce6a19d9c2f31c" datatype="html">
<source>复制</source>
<target>Copy</target>
</trans-unit>
<trans-unit id="95d5e106e679433bec012420b1ab9334c294bc7e" datatype="html">
<source>选择服务器</source>
<target>server</target>
</trans-unit>
<trans-unit id="63346eb53d54138db02c1713ae58f73bb1b8786f" datatype="html">
<source>新闻</source>
<target>News</target>
</trans-unit>
<trans-unit id="b1c134df688af90e436e49f6d3e9f6960f9497c6" datatype="html">
<source>了解更多</source>
<target>More Info</target>
</trans-unit>
<trans-unit id="3ebbe3f1c691ec3184ac8c7a5f360706501e6b50" datatype="html">
<source>名称</source>
<target>Name</target>
</trans-unit>
<trans-unit id="d58ff4f339ad18d82b08fb0615ba8c1cf373a4a2" datatype="html">
<source>操作</source>
<target>Action</target>
</trans-unit>
<trans-unit id="e090f6d9d8129a7b8b92387f05f37eb4b44c0b4e" datatype="html">
<source>卸载</source>
<target>Uninstall</target>
</trans-unit>
<trans-unit id="8d0792a89fc399aafb40cc1228cb8c04a2056883" datatype="html">
<source>本地文件</source>
<target>Local Files</target>
</trans-unit>
<trans-unit id="628c76783ac32e6c8b2ea9134397b8cb82a82cd6" datatype="html">
<source>浏览本地文件</source>
<target>Browse</target>
</trans-unit>
<trans-unit id="6d582ed48c57c91fc7cf10f36f3869cd33808d1d" datatype="html">
<source>校验完整性</source>
<target>Verify integrity</target>
</trans-unit>
<trans-unit id="4809edca33b1a07d7d6e8905287d3825e676f2c8" datatype="html">
<source>安装 <x id="INTERPOLATION"/></source>
<target>Install <x id="INTERPOLATION"/></target>
</trans-unit>
<trans-unit id="f8e60167c7a0871ccf40ed2a0750311411dfd665" datatype="html">
<source>即将开始安装 <x id="INTERPOLATION"/></source>
<target>Preparing Install <x id="INTERPOLATION"/></target>
</trans-unit>
<trans-unit id="63a6c9b023e9e9f8ddfba70b0e24931008fa2510" datatype="html">
<source>安装位置</source>
<target>Path</target>
</trans-unit>
<trans-unit id="0b96c54bf810c6deb2c32253bf16b86d3c90da94" datatype="html">
<source>快捷方式</source>
<target>Shortcuts</target>
</trans-unit>
<trans-unit id="8aa0a41ee6809b972d3904d96607ba5e6dc48fd9" datatype="html">
<source>创建 LaunchPad 快捷方式</source>
<target>Create Launchpad Shortcut</target>
</trans-unit>
<trans-unit id="da32e99069864644f0419f67858d93815e029b02" datatype="html">
<source>创建开始菜单快捷方式</source>
<target>Create Start Menu Shortcut</target>
</trans-unit>
<trans-unit id="d8a2d9a9f8854ad118381e6e30a41dc1959a4f0b" datatype="html">
<source>创建桌面快捷方式</source>
<target>Create Desktop Shortcut</target>
</trans-unit>
<trans-unit id="2ba33dd61b1ac70666322680f248e5336b3ee69a" datatype="html">
<source>依赖:</source>
<target>Dependencies</target>
</trans-unit>
</body>
</file>
</xliff>
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
"start": "tsc && electron .", "start": "tsc && electron .",
"postinstall": "typings install", "postinstall": "typings install",
"tsc": "tsc", "tsc": "tsc",
"tsc:w": "tsc -w" "tsc:w": "tsc -w",
"i18n": "ng-xi18n"
}, },
"license": "UNLICENSED", "license": "UNLICENSED",
"dependencies": { "dependencies": {
...@@ -27,30 +28,26 @@ ...@@ -27,30 +28,26 @@
"@angular/router-deprecated": "latest", "@angular/router-deprecated": "latest",
"@angular/upgrade": "latest", "@angular/upgrade": "latest",
"angular2-in-memory-web-api": "latest", "angular2-in-memory-web-api": "latest",
"aria2": "latest", "rxjs": "5.0.0-beta.12",
"bootstrap": "next", "systemjs": "latest",
"core-js": "latest", "zone.js": "^0.6.21",
"electron-auto-updater": "latest", "electron-auto-updater": "latest",
"electron-cookies": "latest", "electron-cookies": "latest",
"electron-sudo": "mycard/electron-sudo#mycard", "electron-sudo": "mycard/electron-sudo#mycard",
"bootstrap": "next",
"tether": "latest",
"font-awesome": "latest", "font-awesome": "latest",
"aria2": "latest",
"ini": "latest", "ini": "latest",
"mkdirp": "latest", "mkdirp": "latest",
"ng2-translate": "latest", "raw-socket": "latest"
"raw-socket": "latest",
"reflect-metadata": "latest",
"regenerator-runtime": "latest",
"rxjs": "5.0.0-beta.12",
"systemjs": "latest",
"tether": "latest",
"zone.js": "latest"
}, },
"devDependencies": { "devDependencies": {
"concurrently": "latest", "@angular/compiler-cli": "latest",
"@angular/platform-server": "latest",
"electron": "latest", "electron": "latest",
"electron-builder": "latest", "electron-builder": "latest",
"electron-rebuild": "latest", "electron-rebuild": "latest",
"lite-server": "latest",
"typescript": "latest", "typescript": "latest",
"typings": "latest" "typings": "latest"
}, },
......
/*
SystemJS Text plugin from
https://github.com/systemjs/plugin-text/blob/master/text.js
*/
exports.translate = function(load) {
if (this.builder && this.transpiler) {
load.metadata.format = 'esm';
return 'exp' + 'ort var __useDefault = true; exp' + 'ort default ' + JSON.stringify(load.source) + ';';
}
load.metadata.format = 'amd';
return 'def' + 'ine(function() {\nreturn ' + JSON.stringify(load.source) + ';\n});';
}
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
// map tells the System loader where to look for things // map tells the System loader where to look for things
var map = { var map = {
'app': 'app', // 'dist', 'app': 'app', // 'dist',
'text': 'systemjs-text-plugin.js',
'@angular': 'node_modules/@angular', '@angular': 'node_modules/@angular',
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api', 'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
'rxjs': 'node_modules/rxjs', 'rxjs': 'node_modules/rxjs',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment