Articles language tag PDF

Hi.

The other day your companion help detect after @marc , labels that we add when we attach a pdf file and we put as tag name : pdf . When changing language , the name we put on this label created for each item added to believe in the capture attached .

What should I file for change of address ?

@marc Told me that that was a problem and I addressed ojs " locales.xml " within the caperta registration. But I find nothing in it to fix it.

I hope your help.

Hi @gardbeat,

What behavior do you expect to see? Just the name of the galley (e.g. “PDF”) without the language?

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher

What I want is to change the text.

Hi @gardbeat,

Depending on what change you want to make, you may need to modify classes/article/ArticleGalley.inc.php in the getGalleyLabel function.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hello @asmecher .

I think he does not understand me , in the file that tells me not let me change the text and put in another that I want to change .

I want to change the texts that you frame on a red square in the picture attached .

Which as you will see , it appears to me in Spanish, when this website changed the language , in this case English .

Hi @gardbeat,

Can you provide an example of what you want to change that text to?

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Yeah right rather than put PDF (Español (España)), which only put PDF .

Hi @gardbeat,

My suggestion above is what you would need to modify in order to do that.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I do not find within this file.

Hi @gardbeat,

Yes, that’s the function. It’s not a difficult modification but you’ll need some basic knowledge of PHP.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I have no such knowledge, please could help me ?

I just want to narrow the text. Other times it has been easier and yourself I tell you to.

Thank you!

Hello @asmecher .

But there is a file where I can rename the text ?? I only ask that in the English language only display PDF .

Thanks, as always.

1 Like

The English language displays only “PDF” precisely because of the above code that @asmecher referenced and you screen captured.

You really do need someone who is familiar with PHP to help you with this change.

If you are up for the challenge yourself, a PHP tutorial might be enough to get you there: http://www.w3schools.com/php/default.asp

1 Like

But @ctgraham,

I do not understand that has to do with the PHP change the text of a party. With you I already miss similiar things and I did not get to know PHP, I told me the file and I have changed the text of that part.

You won’t be able to make this change with just a modification to the locale files (.xml) or to a template file (.tpl). This requires a PHP modification.

We are just the trail guides. We have paved some awesome trails in the woods. Anyone is welcome to make their own trails, provided they have the right camping gear. If there is a hill or clearing that everyone seems to be trying to reach, we will usually cut that new trail. We will offer advice to experienced hikers who want to clear their own trail.

It would be irresponsible, though, for us to just cut new trails that we don’t intend to maintain if the folks using it don’t have the proper camping gear. It can get cold in the woods.

1 Like

Sorry for the silence.

@gardbeat, when we talk I thought you didn’t want redundancy in your PDF labels (PDF (Español) is enough), so this is why I suggest modify the locales.xml file. But this is not the case… I won’t encourage you do the cange but if you only want PDF as a label (without locale info) the solution pointed by Alec is the only way without collateral damages.

Please @gardbeat, if you still need help, call me by phone so we can modify those files together.

Cheers,
m.

Hola @marc, he estado trabajando con los manuales que me dijistes vía e-mail.

Pero necesitaria saber, sobre que .css de mi web OJS tengo que trabajar para cambiar el texto PDF por una imagen.

Espero su respuesta.

Gracias!

Hola @gardbeat,

Como te comentaba por correo, para el caso que nos ocupa (cambiar una cadena de texto por una imagen), lo más sencillo es utilizar CSS.

OJS te permite cargar tu propio archivo de hojas de estilo sin modificar el código. Lo puedes hacer en el paso 5 de la configuración de tu revista: Area personal > Gestor/a de revista > Configuración > Paso 5

La URL serà algo como “http://turevista.com/manager/setup/5

En en el apartado 5.6 tienes el formulario que te permite subir tu CSS:

No te lo recomiendo, pero si prefieres modificar directamente los CSS de OJS (piensa que se van a sobreescribir cuando actualices la versión), aquí se explica dónde están y para que sirven:
https://pkp.sfu.ca/wiki/index.php/Customizing_OJS#Stylesheet_Modifications

Saludos,
m.

BTW @gardbeat, I just noticed you created and uploaded a css to your journal before (with @ctgraham).

So now you only need to:

  1. Download your existing CSS.
  2. Modify with your new additions (to hide text and show an icon instead)
  3. Upload as you did (in steep 5.6).

Cheers,
m.

Hi! @asmecher, @gardbeat and @marc

I also need rather than put PDF (Spanish (Spain)), Which only put PDF.
But I do not know what to change in this function …
Is it possible to help us a little more?
How you should be the “function”?

function getGalleyLabel() {
		$label = $this->getLabel();
		if ($this->getLocale() != AppLocale::getLocale()) {
			$locales = AppLocale::getAllLocales();
			$label .= ' (' . $locales[$this->getLocale()] . ')';
		}
		return $label;
	}

I removed is part of the code and it works … but I’m not sure … $label .= ’ (’ . $locales[$this->getLocale()] . ‘)’;

function getGalleyLabel() {
		$label = $this->getLabel();
		if ($this->getLocale() != AppLocale::getLocale()) {
			$locales = AppLocale::getAllLocales();
		}
		return $label;
	}

Thank you very much!

David A.