File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,6 +210,8 @@ <h2 data-i18n="settingsTitle"></h2>
210210 < select id ="sel-lang ">
211211 < option value ="es "> Español</ option >
212212 < option value ="en "> English</ option >
213+ < option value ="fr "> Français</ option >
214+ < option value ="it "> Italiano</ option >
213215 </ select >
214216 </ div >
215217 < div class ="set-row ">
Original file line number Diff line number Diff line change 11{
22 "name" : " afkode" ,
33 "private" : true ,
4- "version" : " 0.8.4 " ,
4+ "version" : " 0.8.5 " ,
55 "type" : " module" ,
66 "scripts" : {
77 "dev" : " vite" ,
Original file line number Diff line number Diff line change 11[package ]
22name = " afkode"
3- version = " 0.8.4 "
3+ version = " 0.8.5 "
44description = " In-game overlay to supervise AI coding agents while you play"
55authors = [" Omar Hernandez" ]
66license = " MIT"
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://schema.tauri.app/config/2" ,
33 "productName" : " AFKode" ,
4- "version" : " 0.8.4 " ,
4+ "version" : " 0.8.5 " ,
55 "identifier" : " app.afkode.overlay" ,
66 "build" : {
77 "beforeDevCommand" : " npm run dev" ,
Original file line number Diff line number Diff line change @@ -65,7 +65,13 @@ const altX = navigator.platform.toUpperCase().includes("MAC") ? "⌥X" : "Alt+X"
6565function localizeTooltip ( ) {
6666 try {
6767 const lang = JSON . parse ( localStorage . getItem ( "settings" ) ?? "{}" ) . lang ;
68- openBtn . title = lang === "es" ? `Abrir overlay (${ altX } )` : `Open overlay (${ altX } )` ;
68+ const open : Record < string , string > = {
69+ es : `Abrir overlay (${ altX } )` ,
70+ en : `Open overlay (${ altX } )` ,
71+ fr : `Ouvrir l'overlay (${ altX } )` ,
72+ it : `Apri l'overlay (${ altX } )` ,
73+ } ;
74+ openBtn . title = open [ lang ] ?? open . en ;
6975 replyBtn . title = altX . replace ( "X" , "P" ) ;
7076 } catch {
7177 /* keep default */
Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -49,18 +49,22 @@ let sugs: Suggestion[] = [];
4949let sel = - 1 ;
5050let debounceTimer = 0 ;
5151
52- function isEs ( ) : boolean {
52+ function uiLang ( ) : string {
5353 try {
54- return JSON . parse ( localStorage . getItem ( "settings" ) ?? "{}" ) . lang === "es ";
54+ return JSON . parse ( localStorage . getItem ( "settings" ) ?? "{}" ) . lang ?? "en ";
5555 } catch {
56- return false ;
56+ return "en" ;
5757 }
5858}
5959
6060function placeholder ( ) : string {
61- return isEs ( )
62- ? "Escribe un prompt… ( / comandos · @ archivos · Tab completa )"
63- : "Type a prompt… ( / commands · @ files · Tab completes )" ;
61+ const map : Record < string , string > = {
62+ es : "Escribe un prompt… ( / comandos · @ archivos · Tab completa )" ,
63+ en : "Type a prompt… ( / commands · @ files · Tab completes )" ,
64+ fr : "Écrivez un prompt… ( / commandes · @ fichiers · Tab complète )" ,
65+ it : "Scrivi un prompt… ( / comandi · @ file · Tab completa )" ,
66+ } ;
67+ return map [ uiLang ( ) ] ?? map . en ;
6468}
6569
6670function resize ( ) {
You can’t perform that action at this time.
0 commit comments