Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
add language selector
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsute committed Nov 22, 2022
1 parent 6b055e1 commit ec5e39f
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ jobs:
- name: ✔️ Package with Maven
run: mvn package -DskipTests --no-transfer-progress

- name: 📦 Zip All
uses: montudor/action-zip@v1
with:
args: zip -qq -r all.zip site target/mta-information-site.jar

- name: 🚀 Deploy to GitHub Releases
uses: AButler/upload-release-assets@v2.0
with:
files: 'target/mta-information-site.jar;site.zip'
files: 'target/mta-information-site.jar;site.zip;all.zip'
repo-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.katsute</groupId>
<artifactId>mta-information-site</artifactId>
<version>2.21.0</version>
<version>2.23.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
139 changes: 139 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,145 @@

<main>
Hello World!

<br>
<!-- https://cloud.google.com/translate/docs/languages -->
<select name="lang">
<option value="en" selected>English</option>
<option value="af">Afrikaans</option>
<option value="sq">Albanian</option>
<option value="am">Amharic</option>
<option value="ar">Arabic</option>
<option value="hy">Armenian</option>
<option value="as">Assamese</option>
<option value="ay">Aymara</option>
<option value="az">Azerbaijani</option>
<option value="bm">Bambara</option>
<option value="eu">Basque</option>
<option value="be">Belarusian</option>
<option value="bn">Bengali</option>
<option value="bho">Bhojpuri</option>
<option value="bs">Bosnian</option>
<option value="bg">Bulgarian</option>
<option value="ca">Catalan</option>
<option value="ceb">Cebuano</option>
<option value="zh-CN">Chinese (Simplified)</option>
<option value="zh-TW">Chinese (Traditional)</option>
<option value="co">Corsican</option>
<option value="hr">Croatian</option>
<option value="cs">Czech</option>
<option value="da">Danish</option>
<option value="dv">Dhivehi</option>
<option value="doi">Dogri</option>
<option value="nl">Dutch</option>
<option value="eo">Esperanto</option>
<option value="et">Estonian</option>
<option value="ee">Ewe</option>
<option value="fil">Filipino (Tagalog)</option>
<option value="fi">Finnish</option>
<option value="fr">French</option>
<option value="fy">Frisian</option>
<option value="gl">Galician</option>
<option value="ka">Georgian</option>
<option value="de">German</option>
<option value="el">Greek</option>
<option value="gn">Guarani</option>
<option value="gu">Gujarati</option>
<option value="ht">Haitian Creole</option>
<option value="ha">Hausa</option>
<option value="haw">Hawaiian</option>
<option value="he">Hebrew</option>
<option value="hi">Hindi</option>
<option value="hmn">Hmong</option>
<option value="hu">Hungarian</option>
<option value="is">Icelandic</option>
<option value="ig">Igbo</option>
<option value="ilo">Ilocano</option>
<option value="id">Indonesian</option>
<option value="ga">Irish</option>
<option value="it">Italian</option>
<option value="ja">Japanese</option>
<option value="jv">Javanese</option>
<option value="kn">Kannada</option>
<option value="kk">Kazakh</option>
<option value="km">Khmer</option>
<option value="rw">Kinyarwanda</option>
<option value="gom">Konkani</option>
<option value="ko">Korean</option>
<option value="kri">Krio</option>
<option value="ku">Kurdish</option>
<option value="ckb">Kurdish (Sorani)</option>
<option value="ky">Kyrgyz</option>
<option value="lo">Lao</option>
<option value="la">Latin</option>
<option value="lv">Latvian</option>
<option value="ln">Lingala</option>
<option value="lt">Lithuanian</option>
<option value="lg">Luganda</option>
<option value="lb">Luxembourgish</option>
<option value="mk">Macedonian</option>
<option value="mai">Maithili</option>
<option value="mg">Malagasy</option>
<option value="ms">Malay</option>
<option value="ml">Malayalam</option>
<option value="mt">Maltese</option>
<option value="mi">Maori</option>
<option value="mr">Marathi</option>
<option value="mni-Mtei">Meiteilon (Manipuri)</option>
<option value="lus">Mizo</option>
<option value="mn">Mongolian</option>
<option value="my">Myanmar (Burmese)</option>
<option value="ne">Nepali</option>
<option value="no">Norwegian</option>
<option value="ny">Nyanja (Chichewa)</option>
<option value="or">Odia (Oriya)</option>
<option value="om">Oromo</option>
<option value="ps">Pashto</option>
<option value="fa">Persian</option>
<option value="pl">Polish</option>
<option value="pt">Portuguese (Portugal, Brazil)</option>
<option value="pa">Punjabi</option>
<option value="qu">Quechua</option>
<option value="ro">Romanian</option>
<option value="ru">Russian</option>
<option value="sm">Samoan</option>
<option value="sa">Sanskrit</option>
<option value="gd">Scots Gaelic</option>
<option value="nso">Sepedi</option>
<option value="sr">Serbian</option>
<option value="st">Sesotho</option>
<option value="sn">Shona</option>
<option value="sd">Sindhi</option>
<option value="si">Sinhala (Sinhalese)</option>
<option value="sk">Slovak</option>
<option value="sl">Slovenian</option>
<option value="so">Somali</option>
<option value="es">Spanish</option>
<option value="su">Sundanese</option>
<option value="sw">Swahili</option>
<option value="sv">Swedish</option>
<option value="tl">Tagalog (Filipino)</option>
<option value="tg">Tajik</option>
<option value="ta">Tamil</option>
<option value="tt">Tatar</option>
<option value="te">Telugu</option>
<option value="th">Thai</option>
<option value="ti">Tigrinya</option>
<option value="ts">Tsonga</option>
<option value="tr">Turkish</option>
<option value="tk">Turkmen</option>
<option value="ak">Twi (Akan)</option>
<option value="uk">Ukrainian</option>
<option value="ur">Urdu</option>
<option value="ug">Uyghur</option>
<option value="uz">Uzbek</option>
<option value="vi">Vietnamese</option>
<option value="cy">Welsh</option>
<option value="xh">Xhosa</option>
<option value="yi">Yiddish</option>
<option value="yo">Yoruba</option>
<option value="zu">Zulu</option>
</select>
</main>
</body>
</html>
4 changes: 2 additions & 2 deletions src/main/java/dev/katsute/mis/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ public static void main(String[] args) throws Throwable {
final File bt = new File("bus-token.txt");
if(!bt.exists()) throw new FileNotFoundException("File 'bus-token.txt' is missing");
busToken = String.join("\n", Files.readAllLines(bt.toPath())).trim();
if(busToken.isEmpty()) throw new NullPointerException("Bus token is missing from 'bus-token.txt'");
if(busToken.isEmpty()) throw new NullPointerException("Bus token is missing from 'bus-token.txt', request a token at https://bt.mta.info/wiki/Developers/Index");
}
{
final File bt = new File("subway-token.txt");
if(!bt.exists()) throw new FileNotFoundException("File 'subway-token.txt' is missing");
subwayToken = String.join("\n", Files.readAllLines(bt.toPath())).trim();
if(subwayToken.isEmpty()) throw new NullPointerException("Subway token is missing from 'subway-token.txt'");
if(subwayToken.isEmpty()) throw new NullPointerException("Subway token is missing from 'subway-token.txt', request a token at https://api.mta.info/#/signup");
}
System.out.println("Initializing MTA");
// initialize MTA
Expand Down

0 comments on commit ec5e39f

Please sign in to comment.