Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Problems with the Spanish language  (Read 5127 times)

0 Members and 1 Guest are viewing this topic.

KchoPrro

  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 296
    • Adolfo Ventas - Naturaleza Andaluza
Problems with the Spanish language
« on: August 20, 2022, 10:18:51 am »

Hello friends, in my current version of CPG 1.6x the dates of the thumbnails were not displayed correctly. Thanks to the help of @ron4mac, he led me to the solution since the problem came from the language files that needed to be updated. Indeed, I used the english.php language for my website and the dates were displayed correctly. Clearly the solution was to go from a spanish.php 1.5x to 1.6x, but there is no language for version 1.6x so I thought I could start from an english.php 1.6x and translate it with the help of the spanish.php 1.5x file

I have no programming notions, but it didn't seem complicated, I downloaded both languages ​​and, with notepad, I compared the two files english.php vs. spanish.php and copying and pasting from one to another each part of the code that was identical, and using Google Translator for those parts that were only in 1.6x.

After a day of work (it's a lot of translation and revision), I finished creating the new spanish.php 1.6x but when I upload it to my CPG the gallery doesn't show up (nothing comes out). I'm sure I must have left something wrong (constantly copying and pasting could lead to code failures). Would someone be able to tell me what is wrong in the file, because the translation is finished and it could be added as a new language for CPG but... only if it can work.

I attach the file.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Problems with the Spanish language
« Reply #1 on: August 21, 2022, 12:13:15 am »

Line 643 in the file: needs single quote after Vistas descendentes

There is a tool included with CPG 1.6 to help update CPG 1.5.x language files to be more compatible with CPG 1.6.x
https://www.adolfoventas.es/galeria/lang_check.php
Logged

KchoPrro

  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 296
    • Adolfo Ventas - Naturaleza Andaluza
Re: Problems with the Spanish language
« Reply #2 on: August 21, 2022, 03:09:37 pm »

Line 643 in the file: needs single quote after Vistas descendentes

There is a tool included with CPG 1.6 to help update CPG 1.5.x language files to be more compatible with CPG 1.6.x
https://www.adolfoventas.es/galeria/lang_check.php

Oooohhh!!  ;D ;D What a great help! Thank you very much ron4mac!!. Sure enough, that was an unclosed line and it was enough not to show anything from the gallery. I have already solved it :)

In addition, with the tool that you have shown me (I did not know it), I have been able to finish with the Spanish translation for this version 1.6. The tool still tells me that there is an untranslated word;

Code: [Select]
Language file: english.php
Missing translations.

Group: lang_bad_words
["42"] => "wop*"

For me it is not important, besides, I am not able to deduce which words would affect to be translated and nothing happens if we leave that word, taking into account that the most common ones are already indicated and translated.

If you think it convenient, I'll upload the translated and corrected file again. I have left this part untouched (if you want you can edit it yourself).;

Code: [Select]
<?php
/**
 * Coppermine Photo Gallery
 *
 * v1.0 originally written by Gregory Demar
 *
 * @copyright Copyright (c) 2003-2022 Coppermine Dev Team
 * @license GNU General Public License version 3 or later; see LICENSE
 *
 * lang/spanish.php
 * @since 1.6.18
 */

if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

// info about translators and translated language
$lang_translation_info['lang_name_english'] = 'English (US)';
$lang_translation_info['lang_name_native'] = 'English (US)';
$lang_translation_info['lang_country_code'] = 'us';
$lang_translation_info['trans_name'] = 'Coppermine dev team';
$lang_translation_info['trans_email'] = '';
$lang_translation_info['trans_website'] = 'http://coppermine-gallery.net/';
$lang_translation_info['trans_date'] = '2022-08-19';

$lang_charset 'utf-8';
$lang_text_dir 'ltr'// ('ltr' for left to right, 'rtl' for right to left)

// shortcuts for Bytes, Kibibytes, Mebibytes, Gibibytes
$lang_byte_units = array('Bytes''KiB''MiB''GiB');
$lang_decimal_separator = array(',''.'); // symbol used to separate thousands from hundreds and rounded number from decimal place

Really, the credit goes to the people who did the translation for CPG1.4 & 1.5 (jmatute).

Thank you very much! :)
Logged

KchoPrro

  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 296
    • Adolfo Ventas - Naturaleza Andaluza
Re: Problems with the Spanish language
« Reply #3 on: August 21, 2022, 03:18:21 pm »

Sorry, I can't edit the previous message.
This file is better, I had forgotten to translate;

Sun = Domingo
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Problems with the Spanish language
« Reply #4 on: August 21, 2022, 04:20:10 pm »

Thank you. I will add the Spanish language file to the next CPG release.
Logged

BusAmerica

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 66
Re: Problems with the Spanish language
« Reply #5 on: September 12, 2022, 07:19:24 am »

Thank you very much KchoPrro and Ron!

It worked for me, I have replaced the "spanish.php" file (made by KchoPrro) inside the "lang" folder

The only thing that has changed compared to the past is that the order, instead of day/month/year, is now month/day/year.

Can it be changed to day/month/year by changing a line?

Best regards

*****

Muchas gracias !

Me funcionó, he reemplazado el archivo "spanish.php" (hecho por KchoPrro) dentro de la carpeta "lang"

Lo único que cambié respecto del pasado, es que el orden, en vez de día/mes/año, ahora es mes/día/año.

Se puede modificar a día/mes/año cambiando alguna línea?

Saludos cordiales
Logged

KchoPrro

  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 296
    • Adolfo Ventas - Naturaleza Andaluza
Re: Problems with the Spanish language
« Reply #6 on: September 12, 2022, 08:11:08 am »

Thank you very much KchoPrro and Ron!

It worked for me, I have replaced the "spanish.php" file (made by KchoPrro) inside the "lang" folder

The only thing that has changed compared to the past is that the order, instead of day/month/year, is now month/day/year.

Can it be changed to day/month/year by changing a line?

Best regards

*****

Muchas gracias !

Me funcionó, he reemplazado el archivo "spanish.php" (hecho por KchoPrro) dentro de la carpeta "lang"

Lo único que cambié respecto del pasado, es que el orden, en vez de día/mes/año, ahora es mes/día/año.

Se puede modificar a día/mes/año cambiando alguna línea?

Saludos cordiales

I don't have that problem, but it's probably because I don't show all the options on my website, I've only modified those that I needed in order.

The code that regulates this issue is in this section of the php:

Code: [Select]
// The various date formats
// See https://www.php.net/manual/en/datetime.format.php to define the date format strings below
$lang_date['album'] = 'F d, Y';
$lang_date['lastcom'] = 'm/d/y at H:i';
$lang_date['lastup'] = 'F d, Y';
$lang_date['register'] = 'F d, Y';
$lang_date['lasthit'] = 'F d, Y at h:i A';
$lang_date['comment'] = 'F d, Y at h:i A';
$lang_date['log'] = 'F d, Y at h:i A';
$lang_date['scientific'] = 'Y-m-d H:i:s';

You just need to put
Code: [Select]
'F d, Y'; in the corresponding section ($lang_date['comment'], $lang_date['scientific'],.........)
Logged

BusAmerica

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 66
Re: Problems with the Spanish language
« Reply #7 on: September 13, 2022, 04:40:39 am »

Thaks so much for the orientation KchoPrro.

Replace this
"F d, Y"

with this.
"d F, Y"

And it worked correctly.

Best regards

***************

Muchas gracias por la orientación KchoPrro.

Reemplace esto
"F d, Y"

por esto.
"d F, Y"

Y funcionó correctamente.

Saludos cordiales
Logged

KchoPrro

  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 296
    • Adolfo Ventas - Naturaleza Andaluza
Re: Problems with the Spanish language
« Reply #8 on: September 13, 2022, 07:23:15 am »

Thaks so much for the orientation KchoPrro.

Replace this
"F d, Y"

with this.
"d F, Y"

And it worked correctly.

Best regards

***************

Muchas gracias por la orientación KchoPrro.

Reemplace esto
"F d, Y"

por esto.
"d F, Y"

Y funcionó correctamente.

Saludos cordiales

Oupssss!! :o You're right, I put the order of the codes wrong :-[, it was like you correctly deduced "d F, Y". At the time I was looking for a way to put, for example, "September 13, 2022", but there seems to be no encoding for this type of date so I did not waste any more time and left it at "09-13-2022". I'm glad I was able to help you, I don't know anything about programming, so helping someone with CPG seems like a miracle to me ;D


***************


Oupssss!!  :o Tienes razón, te puse mal el orden de los códigos  :-[, era como bien has deducido "d F, Y". En su momento estuve buscando la forma de poner, por ejemplo, "13 de Septiembre de 2.022", pero no parece haber codificación para esta tipología de fecha así que no perdí más el tiempo y lo deje en "13-09-2022". Me alegra que te haya podido ayudar, no sé nada de programación, así que ayudar a alguien con CPG me parece un milagro  ;D
Logged

BusAmerica

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 66
Re: Problems with the Spanish language
« Reply #9 on: September 13, 2022, 07:49:24 am »

I am happier more.

I would like to know more, to be able to give back to CPG some of what it has given us

***************

Yo me alegro mas.
A mi me gustaría saber mas, para poder retribuir a CPG algo de lo que nos ha dado.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.