update
17
.editorconfig
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[**.html]
|
||||||
|
indent_style = tab
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[**.md]
|
||||||
|
trim_trailing_whitespace = false
|
21
LICENSE.txt
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2024 the_al
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
@ -1,12 +1,14 @@
|
|||||||
# Translations Guidelines
|
# Translations Guidelines
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Translations for the "DualShock Calibration GUI" project are managed through
|
Translations for the "DualShock Calibration GUI" project are managed through
|
||||||
JSON files located in the [lang/ directory](https://github.com/dualshock-tools/dualshock-tools.github.io/tree/main/lang).
|
JSON files located in the [lang/ directory](https://github.com/dualshock-tools/dualshock-tools.github.io/tree/main/lang).
|
||||||
|
|
||||||
This document provides guidelines on how to contribute translations for new languages.
|
This document provides guidelines on how to contribute translations for new languages.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
To translate the project into a new language, follow these steps:
|
To translate the project into a new language, follow these steps:
|
||||||
|
|
||||||
1. **Duplicate an Existing File**: Start by duplicating an existing language file located in the `lang/` directory. For example, if you're translating into Spanish, duplicate `lang/it_it.json` and rename it to `lang/es_es.json`.
|
1. **Duplicate an Existing File**: Start by duplicating an existing language file located in the `lang/` directory. For example, if you're translating into Spanish, duplicate `lang/it_it.json` and rename it to `lang/es_es.json`.
|
||||||
@ -19,15 +21,16 @@ To translate the project into a new language, follow these steps:
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var available_langs = {
|
var available_langs = {
|
||||||
"es_es": { "name": "Español", "file": "es_es.json"},
|
es_es: { name: "Español", file: "es_es.json" },
|
||||||
"fr_fr": { "name": "Français", "file": "fr_fr.json"},
|
fr_fr: { name: "Français", file: "fr_fr.json" },
|
||||||
"hu_hu": { "name": "Magyar", "file": "hu_hu.json"},
|
hu_hu: { name: "Magyar", file: "hu_hu.json" },
|
||||||
"it_it": { "name": "Italiano", "file": "it_it.json"},
|
it_it: { name: "Italiano", file: "it_it.json" },
|
||||||
"zh_cn": { "name": "中文", "file": "zh_cn.json"},
|
zh_cn: { name: "中文", file: "zh_cn.json" },
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
## Submitting Translations
|
## Submitting Translations
|
||||||
|
|
||||||
Once you have completed the translation, you can contribute it in one of the following ways:
|
Once you have completed the translation, you can contribute it in one of the following ways:
|
||||||
|
|
||||||
- **Pull Request (PR)**: Open a Pull Request with the changes.
|
- **Pull Request (PR)**: Open a Pull Request with the changes.
|
||||||
|
45
app.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
// app.js
|
||||||
|
const http = require("http");
|
||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
const url = require("url");
|
||||||
|
|
||||||
|
const port = 8080;
|
||||||
|
const host = "0.0.0.0";
|
||||||
|
const mimeTypes = {
|
||||||
|
".html": "text/html",
|
||||||
|
".css": "text/css",
|
||||||
|
".js": "application/javascript",
|
||||||
|
".svg": "image/svg+xml",
|
||||||
|
".png": "image/png",
|
||||||
|
".jpg": "image/jpeg",
|
||||||
|
".jpeg": "image/jpeg",
|
||||||
|
".gif": "image/gif",
|
||||||
|
".ico": "image/x-icon",
|
||||||
|
".json": "application/json",
|
||||||
|
".txt": "text/plain",
|
||||||
|
};
|
||||||
|
|
||||||
|
http
|
||||||
|
.createServer((req, res) => {
|
||||||
|
// Parse the URL and extract just the pathname, ignoring query parameters
|
||||||
|
const parsedUrl = url.parse(req.url);
|
||||||
|
let filePath = "." + decodeURIComponent(parsedUrl.pathname);
|
||||||
|
if (filePath === "./") filePath = "./index.html";
|
||||||
|
|
||||||
|
const ext = path.extname(filePath).toLowerCase();
|
||||||
|
const contentType = mimeTypes[ext] || "application/octet-stream";
|
||||||
|
|
||||||
|
fs.readFile(filePath, (err, content) => {
|
||||||
|
if (err) {
|
||||||
|
res.writeHead(404);
|
||||||
|
res.end("404 Not Found");
|
||||||
|
} else {
|
||||||
|
res.writeHead(200, { "Content-Type": contentType });
|
||||||
|
res.end(content);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.listen(port, host, () => {
|
||||||
|
console.log(`Server running at http://${host}:${port}/`);
|
||||||
|
});
|
9
css/all.min.css
vendored
Normal file
6
css/bootstrap.min.css
vendored
Normal file
7032
css/fa.min.css
vendored
Normal file
9
css/fontawesome.min.css
vendored
Normal file
9
fa.min.css
vendored
@ -1 +0,0 @@
|
|||||||
google-site-verification: googlec4c2e36a49e62fa3.html
|
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 659 B After Width: | Height: | Size: 659 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |