Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
PersesTitan committed Jan 18, 2024
1 parent 04b9a15 commit b6fb21a
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 2 deletions.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

<script type="module" src="script/library/library_run.js"></script>
<script type="module" src="script/application/application_run.js"></script>

<script type="module" src="language/ConverterLanguage.js"></script>
</head>
<body>
<header>
Expand Down Expand Up @@ -78,7 +80,8 @@
<ul id="role">
<li>
<a href="https://github.com/VaneProject/.github/blob/main/VANE_TEAM_RULE.md">
<img src="./svg/vane_role.svg" alt="vane role" class="svg">&nbsp;베인 규칙
<img src="./svg/vane_role.svg" alt="vane role" class="svg">
&nbsp;베인 규칙
</a>
</li>
<li>
Expand Down
23 changes: 23 additions & 0 deletions language/ConverterLanguage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use strict";
class ConverterLanguage {
constructor(fileName, fileBits = ["language"]) {
const file = new File(fileBits, fileName);
const reader = new FileReader();
reader.readAsText(file);
reader.onload = () => {
const result = reader.result;
this.data = JSON.parse(result);
};
}
getLang(key) {
switch (getLocal()) {
case Local.KOR:
return this.data[key];
case Local.ENG:
return this.data[key];
case Local.JAP:
return this.data[key];
}
}
}
const index = new ConverterLanguage("index.json");
25 changes: 25 additions & 0 deletions language/ConverterLanguage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class ConverterLanguage {
private data: any;
constructor(fileName: string, fileBits: BlobPart[] = ["language"]) {
const file: File = new File(fileBits, fileName);
const reader: FileReader = new FileReader();
reader.readAsText(file);
reader.onload = (): void => {
const result: string = reader.result as string;
this.data = JSON.parse(result);
}
}

public getLang(key: string): string {
switch (getLocal()) {
case Local.KOR:
return this.data[key];
case Local.ENG:
return this.data[key];
case Local.JAP:
return this.data[key];
}
}
}

const index: ConverterLanguage = new ConverterLanguage("index.json");
3 changes: 3 additions & 0 deletions language/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"베인 규칙": ["베인 규칙", "Vane Rule", "베인 규칙"]
}
16 changes: 16 additions & 0 deletions library/cut-image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use strict";
(function () {
const lc = new LibraryContent("language-java");
const macosDownload = document.getElementsByClassName("macos_download")[0];
const windows_download = document.getElementsByClassName("windows_download")[0];
macosDownload.href = `https://github.com/VaneProject/cut-image/releases/download/${cut_image_version}/CutImage-${cut_image_version}.dmg`;
windows_download.href = `https://github.com/VaneProject/cut-image/releases/download/${cut_image_version}/CutImage-${cut_image_version}.exe`;
setLocal("https://github.com/VaneProject/cut-image/releases");
setMainLink(lc.getLocal());
setTitle('Cut Image');
primaryCreate('cutimage', cut_image_version);
setLicense('https://github.com/VaneProject/.github/blob/main/LICENSE', 'Vane');
setDeveloper('PersesTitan');
setLanguage('Java');
changeIcon();
}).call(null);
2 changes: 1 addition & 1 deletion script/load/shared_class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Developer {
<img src="../../svg/developer.svg" alt="developer" class="svg application_list_icon">
${this.name}
</a>
</li>`
</li>`;
}
}

Expand Down

0 comments on commit b6fb21a

Please sign in to comment.