Skip to content

Commit 4ad9866

Browse files
amnutscvc90
andauthored
Next release (#112)
* Creation of the translation archive for the Spanish language in Spain * Fixed incorrect footer version handling and made into language pack values * Added package-lock to repo * Added a couple composer scripts and updated readme --------- Co-authored-by: Carlos V <76731844+cvc90@users.noreply.github.com>
1 parent f3a8fe4 commit 4ad9866

11 files changed

+3517
-156
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,21 @@ If you wanted to have the js in-line, then you can use the `-j` or `--local-js`
221221

222222
There's an old saying that goes, "If you know more than one language you're multilingual, if you don't you're British." Not only is that a damning indictment of the British mentality towards other languages, but also goes to explain why the UI has only so far been in English - because I am, for all my sins, British.
223223

224-
However, it is now possible to build the interface with a different language. Currently, thanks to a contributor, French is also supported. If anyone else wants to contribute additional language packs, please submit a PR!
224+
However, it is now possible to build the interface with a different language. Currently, thanks to contributors, French and Spanish are also supported. If anyone else wants to contribute additional language packs, please submit a PR!
225225

226226
If the language pack is in the `build/_languages/` directory then you can use that with the `-l` or `--lang` flag. For example, if there is a `fr.json` language pack then you can use `php ./build/build.php -l fr` in order to build with that language.
227227

228+
There have been a few composer scripts added to help with the building. They are, `composer build`, `composer build-french`, and `composer build-spanish`.
229+
228230
If you want to create a language file then `build/_languages/example.json` contains all you need. It's a simple json structure with the key being the English version which matches what's in the UI, and the value is what you're converting it to - which in the example file is just blank. If a value is empty or the index doesn't exist for a translation, then it'll just use the English version. This gives you the ability to replace some or all of the interface strings as you see fit.
229231

230-
So to get started with a new language, copy the `example.json` to the language you want that doesn't already exist - for example, `pt-br.json`. Then fill in the translations into the values. Once done, rebuild with `php ./build/build.php -l pt-br`.
232+
To get started with a new language, copy the `example.json` to the language you want that doesn't already exist - for example, `pt-br.json` or `pirate.json`. Then fill in the translations into the values. Once done, rebuild with `php ./build/build.php -l pt-br` or `php ./build/build.php -l pirate`.
231233

232234
## Releases
233235

236+
**Version 3.5.5**\
237+
Added Spanish translations thanks to @cvc90 (PR#110)
238+
234239
**Version 3.5.4**\
235240
Better handling of whether JIT is enabled or disabled. Now also shows _why_ it might be disabled even if you have the setting turned on. The interface also disables the graph and memory stats correctly for JIT if it's disabled for any reason.
236241

build/_frontend/interface.jsx

+8-5
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ class Interface extends React.Component {
9191
txt={this.txt}
9292
/>
9393
</header>
94-
<Footer version={this.props.opstate.version.gui} />
94+
<Footer
95+
version={this.props.opstate.version.gui}
96+
txt={this.txt}
97+
/>
9598
</>
9699
);
97100
}
@@ -1187,13 +1190,13 @@ function Footer(props) {
11871190
<footer className="main-footer">
11881191
<a className="github-link" href="https://github.com/amnuts/opcache-gui"
11891192
target="_blank"
1190-
title="opcache-gui (currently version {props.version}) on GitHub"
1191-
>https://github.com/amnuts/opcache-gui - version {props.version}</a>
1193+
title={props.txt("opcache-gui (currently version {0}) on GitHub", props.version)}
1194+
>https://github.com/amnuts/opcache-gui - {props.txt("version {0}", props.version)}</a>
11921195

11931196
<a className="sponsor-link" href="https://github.com/sponsors/amnuts"
11941197
target="_blank"
1195-
title="Sponsor this project and author on GitHub"
1196-
>Sponsor this project</a>
1198+
title={props.txt("Sponsor this project and author on GitHub")}
1199+
>{props.txt("Sponsor this project")}</a>
11971200
</footer>
11981201
);
11991202
}

build/_languages/es.json

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{
2+
"(unsafe) Collect constants": "(inestable) Recoger las constantes",
3+
"++, +=, series of jumps": "++, +=, series de saltos",
4+
"Adjust used stack": "Ajustar pila usada",
5+
"Ascending": "Ascendente",
6+
"Available functions": "Funciones disponibles",
7+
"blacklist misses": "fallos en la blacklist",
8+
"buffer size": "tamaño del búfer",
9+
"Cached": "En cache",
10+
"CALL GRAPH optimization": "Optimización CALL GRAPH",
11+
"CFG based optimization": "Optimización basada en CFG",
12+
"Compile all functions on script load": "Compilar todas las funciones al cargar el script",
13+
"Compile functions on first execution": "Compilar funciones en la primera ejecución",
14+
"Constant conversion and jumps": "Conversión constante y saltos",
15+
"CPU-specific optimization": "Optimización específica de la CPU",
16+
"CSE, STRING construction": "Construcción CSE, STRING",
17+
"Currently unused": "Actualmente sin utilizar",
18+
"DCE (dead code elimination)": "DCE (eliminación del código muerto)",
19+
"Descending": "Descendente",
20+
"DFA based optimization": "Optimización basada en DFA",
21+
"Directives": "Directivas",
22+
"Disable CPU-specific optimization": "Desactivar la optimización específica de la CPU",
23+
"Disable real-time update": "Desactivar la actualización en tiempo real",
24+
"Do not perform register allocation": "No realizar la asignación de registros",
25+
"Enable real-time update": "Activar la actualización en tiempo real",
26+
"Enable use of AVX, if the CPU supports it": "Habilitar el uso de AVX, si la CPU lo soporta",
27+
"false": "falso",
28+
"File list pagination": "Paginación de la lista de archivos",
29+
"force file invalidation": "forzar la invalidación de archivos",
30+
"free memory": "memoria libre",
31+
"General info": "Información general",
32+
"has been invalidated": "se ha invalidado",
33+
"hit rate": "índice de aciertos",
34+
"hits": "hits",
35+
"Host": "Host",
36+
"Ignored": "Ignorado",
37+
"INIT_FCALL_BY_NAME -> DO_FCALL": "INIT_FCALL_BY_NAME -> DO_FCALL",
38+
"Inline functions": "Funciones inline",
39+
"Inline VM handlers": "Controladores de VM en línea",
40+
"interned strings usage": "utilización de cadenas internas",
41+
"Invalidate all matching files": "Invalidar todos los ficheros coincidentes",
42+
"jit buffer free": "búfer jit libre",
43+
"jit buffer": "búfer jit",
44+
"keys": "llaves",
45+
"Last modified": "Última modificación",
46+
"last modified": "última modificaciónn",
47+
"Last reset": "Último reinicio",
48+
"Last used": "Último uso",
49+
"last used": "último uso",
50+
"max cached keys": "llaves máximas en caché",
51+
"Memory consumption": "Consumo de memoria",
52+
"memory usage": "uso de memoria",
53+
"memory": "memoria",
54+
"Merge equal constants": "Fusionar las constantes iguales",
55+
"Minimal JIT (call standard VM handlers)": "JIT mínimo (llame a controladores de VM estándar)",
56+
"never": "nunca",
57+
"Next": "Siguiente",
58+
"No files have been cached or you have <i>opcache.file_cache_only<\/i> turned on": "No se han almacenado archivos en caché o tiene <i>opcache.file_cache_only<\/i> activado",
59+
"No files have been ignored via <i>opcache.blacklist_filename<\/i>": "No se han ignorado archivos a través de <i>opcache.blacklist_filename<\/i>",
60+
"No files have been preloaded <i>opcache.preload<\/i>": "No se han precargado archivos <i>opcache.preload<\/i>",
61+
"No JIT": "No JIT",
62+
"no value": "sin valor",
63+
"NOP removal": "Eliminación de NOP",
64+
"number of cached files": "número de archivos en caché",
65+
"number of cached keys": "número de llaves en caché",
66+
"Number of hits": "Número de hits",
67+
"number of hits": "número de hits",
68+
"number of misses": "número de misses",
69+
"number of strings": "número de cadenas",
70+
"opcache statistics": "estadísticas de opcache",
71+
"Optimization level": "Nivel de optimización",
72+
"Optimize whole script": "Optimizar todo el script",
73+
"Overview": "Visión general",
74+
"Path": "Ruta",
75+
"Perform block-local register allocation": "Asignación de registros a nivel local de bloque",
76+
"Perform global register allocation": "Realizar la asignación global de registros",
77+
"preload memory": "precargar la memoria",
78+
"Preloaded": "Precargado",
79+
"Previous": "Anterior",
80+
"Profile functions on first request and compile the hottest functions afterwards": "Perfile las funciones en la primera solicitud y luego recopile las funciones más populares",
81+
"Profile on the fly and compile hot functions": "Perfilar sobre la marcha y compilar funciones en caliente",
82+
"Register allocation": "Asignación de registros",
83+
"Remove unused variables": "Eliminar variables no utilizadas",
84+
"Reset cache": "Restablecer la caché",
85+
"SCCP (constant propagation)": "SCCP (propagación de constantes)",
86+
"Script": "Script",
87+
"Server Software": "Software de servidor",
88+
"Sort order": "Orden de clasificación",
89+
"Start time": "Hora de inicio",
90+
"Start typing to filter on script path": "Empiece a escribir para filtrar por ruta del script",
91+
"TMP VAR usage": "Utilización de TMP VAR",
92+
"total memory": "memoria total",
93+
"Trigger": "Disparador",
94+
"true": "verdadero",
95+
"Use call graph": "Utilizar el gráfico de llamadas",
96+
"Use tracing JIT. Profile on the fly and compile traces for hot code segments": "Utilice el trazado JIT. Perfila sobre la marcha y compila trazas para segmentos de código calientes.",
97+
"Use type inference": "Utilizar la inferencia de tipos",
98+
"used memory": "memoria utilizada",
99+
"View manual page": "Ver la página del manual",
100+
"View {0} manual entry": "Ver {0} entrada manual",
101+
"wasted memory": "memoria perdida",
102+
"You have <i>opcache.file_cache_only<\/i> turned on. As a result, the memory information is not available. Statistics and file list may also not be returned by <i>opcache_get_statistics()<\/i>.": "Tienes <i>opcache.file_cache_only</i> activado. Como resultado, la información de la memoria no está disponible. Es posible que las estadísticas y la lista de archivos tampoco sean devueltas por <i>opcache_get_statistics()<\/i>.",
103+
"{0} files cached": "{0} archivos almacenados en caché",
104+
"{0} files cached, {1} showing due to filter '{2}'": "{0} archivos almacenados en caché, {1} se visualizan debido al filtro '{2}'",
105+
"{0} ignore file locations": "{0} ignorar ubicaciones de archivos",
106+
"{0} preloaded files": "{0} archivos precargados",
107+
"JIT enabled": "JIT activado",
108+
"disabled due to <i>opcache.jit</i> setting": "ddesactivado debido a la configuración de <i>opcache.jit</i>",
109+
"the <i>opcache.jit_buffer_size</i> must be set to fully enable JIT": "el <i>opcache.jit_buffer_size</i> debe estar configurado para habilitar completamente JIT",
110+
"incompatible with extensions that override <i>zend_execute_ex()</i>, such as <i>xdebug</i>": "incompatible con las extensiones que anulan <i>zend_execute_ex()</i>, como <i>xdebug</i>",
111+
"Yes": "",
112+
"No": "No"
113+
}

build/_languages/example.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"Directives": "",
2222
"Disable CPU-specific optimization": "",
2323
"Disable real-time update": "",
24+
"disabled due to <i>opcache.jit</i> setting": "",
2425
"Do not perform register allocation": "",
2526
"Enable real-time update": "",
2627
"Enable use of AVX, if the CPU supports it": "",
@@ -34,13 +35,15 @@
3435
"hits": "",
3536
"Host": "",
3637
"Ignored": "",
38+
"incompatible with extensions that override <i>zend_execute_ex()</i>, such as <i>xdebug</i>": "",
3739
"INIT_FCALL_BY_NAME -> DO_FCALL": "",
3840
"Inline functions": "",
3941
"Inline VM handlers": "",
4042
"interned strings usage": "",
4143
"Invalidate all matching files": "",
4244
"jit buffer free": "",
4345
"jit buffer": "",
46+
"JIT enabled": "",
4447
"keys": "",
4548
"Last modified": "",
4649
"last modified": "",
@@ -60,6 +63,7 @@
6063
"No files have been preloaded <i>opcache.preload<\/i>": "",
6164
"No JIT": "",
6265
"no value": "",
66+
"No": "",
6367
"NOP removal": "",
6468
"number of cached files": "",
6569
"number of cached keys": "",
@@ -86,8 +90,11 @@
8690
"Script": "",
8791
"Server Software": "",
8892
"Sort order": "",
93+
"Sponsor this project and author on GitHub": "",
94+
"Sponsor this project": "",
8995
"Start time": "",
9096
"Start typing to filter on script path": "",
97+
"the <i>opcache.jit_buffer_size</i> must be set to fully enable JIT": "",
9198
"TMP VAR usage": "",
9299
"total memory": "",
93100
"Trigger": "",
@@ -96,18 +103,14 @@
96103
"Use tracing JIT. Profile on the fly and compile traces for hot code segments": "",
97104
"Use type inference": "",
98105
"used memory": "",
106+
"version {0}": "",
99107
"View manual page": "",
100108
"View {0} manual entry": "",
101109
"wasted memory": "",
110+
"Yes": "",
102111
"You have <i>opcache.file_cache_only<\/i> turned on. As a result, the memory information is not available. Statistics and file list may also not be returned by <i>opcache_get_statistics()<\/i>.": "",
103112
"{0} files cached": "",
104113
"{0} files cached, {1} showing due to filter '{2}'": "",
105114
"{0} ignore file locations": "",
106-
"{0} preloaded files": "",
107-
"JIT enabled": "",
108-
"disabled due to <i>opcache.jit</i> setting": "",
109-
"the <i>opcache.jit_buffer_size</i> must be set to fully enable JIT": "",
110-
"incompatible with extensions that override <i>zend_execute_ex()</i>, such as <i>xdebug</i>": "",
111-
"Yes": "",
112-
"No": ""
115+
"{0} preloaded files": ""
113116
}

build/build.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* OPcache GUI - build script
55
*
66
* @author Andrew Collington, andy@amnuts.com
7-
* @version 3.5.4
7+
* @version 3.5.5
88
* @link https://github.com/amnuts/opcache-gui
99
* @license MIT, https://acollington.mit-license.org/
1010
*/

build/template.phps

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* A simple but effective single-file GUI for the OPcache PHP extension.
77
*
88
* @author Andrew Collington, andy@amnuts.com
9-
* @version 3.5.4
9+
* @version 3.5.5
1010
* @link https://github.com/amnuts/opcache-gui
1111
* @license MIT, https://acollington.mit-license.org/
1212
*/

composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
}
3232
},
3333
"scripts": {
34-
"build": "php build/build.php"
34+
"build": "php build/build.php",
35+
"build-french": "php build/build.php --lang fr",
36+
"build-spanish": "php build/build.php --lang es"
3537
}
3638
}

0 commit comments

Comments
 (0)