Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

DataObjectManager : <% sprintf(....) %> displayed on the website


Go to End


48 Posts   13711 Views

Avatar
Raphael--

Community Member, 14 Posts

22 October 2009 at 3:40am

Hi everyone,

I'm using SS 2.3.3 and the latest DataObjectManager module (3.10 I guess) + Image Galery.
I just installed both modules but I can't fix a little problem on the "Add Item" button.

See screenshot here : http://michelraph.free.fr/ss.jpg

As you can see, I'm using Silverstripe in French but even if I change my profile's language in English (US), I still have this problem.
I tried to change the line 255 in dataobject_manager/code/FileDataObjectManager.php by :
new HeaderField($title = _t('DataObjectManager.ADDITEM', 'Add %s'), $headingLevel = 2),

Or just change the translation for ADDITEM in dataobject_manager/lang/en_US.php replacing the array() by a simple text.

But both tries don't fix the problem !

It might be more a Silverstripe problem than a bug in DataObjectManager's code but I have no idea how to fix it.

Does anyone already get this problem ?

Thank you for your help.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

22 October 2009 at 5:41am

Je me rappele de réparer cette probleme il ya longtemps, mais c'est possible que j'ai tort. Si vous examinez la ligne #6 dans DataObjectManager.ss, vous pouvez voir qu'il ya de l'espace entre les guillemets ' ' (?) et les commas:

<% sprintf(_t('DataObjectManager.ADDITEM', 'Add %s', PR_MEDIUM, 'Add [name]'),$AddTitle) %>

Ca fera un erreur. Vous pouvez le réparer immédiatement en effacant l'espace, et laissez-moi savoir le resultat.

J'éspere que vous pouvez me comprendre. C'est amusant de temps en temps a essayer mon francais. Je n'ai jamais la chance de le parler. :(

Avatar
Raphael--

Community Member, 14 Posts

22 October 2009 at 7:02am

Edited: 22/10/2009 7:03am

Ohlalala ! En plus d'être un bon développeur actif et qui résout tout nos problèmes, tu parles parfaitement français ! Incroyable !

Merci pour ta réponse. J'ai regardé la ligne #6. Voici sa valeur originale :

<% sprintf(_t('DataObjectManager.ADDITEM', 'Add %s', PR_MEDIUM, 'Add [name]'),$AddTitle) %> 

Et voici la ligne avec les corrections apportées (si j'ai bien compris) :

<% sprintf(_t('DataObjectManager.ADDITEM','Add %s',PR_MEDIUM,'Add [name]'),$AddTitle) %> 

Je vois bien que ma correction a été prise en compte car les espaces n'apparaissent plus sur le texte, mais le code source s'affiche toujours sur le site web : ca ne résout donc pas le problème :(

J'espère avoir été clair avec mon français ? N'hésite pas à me dire si tu veux que je traduise en anglais. Mais encore bravo pour ton français, il est largement compréhensible !

Avatar
Juanitou

Community Member, 323 Posts

22 October 2009 at 11:40am

UncleCheese parle français !

Mais qu’est-ce qu’il ne sait pas faire ? ;-)

Best regards,
Juan

Avatar
UncleCheese

Forum Moderator, 4102 Posts

22 October 2009 at 12:00pm

Zut alors!

Je te comprends totallement. La probleme principale au moment est que je ne peux pas le repliquer sur mon site web -- pas en englais ni en francais.

Faites sur (ou sont mes accents?!) que vous avez utilizer le ?flush=1 pour obtenir le template nouveau.

Je dois partir pour la nuit, mais j'en penserai...

Avatar
Raphael--

Community Member, 14 Posts

22 October 2009 at 9:22pm

Edited: 22/10/2009 9:40pm

Oui, j'ai bien fait un ?flush=1 mais ca le fait toujours (cf http://michelraph.free.fr/ss2.jpg : les espaces ne sont plus entre les guillemets et les virgules).

En attendant que la solution te revienne, ne t'inquiète pas, je vais changer ca en brut dans le code pour satisfaire le client.
Et si à tout hasard ca te revient, n'hésite pas à le poster ici !

Merci encore.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

23 October 2009 at 1:56am

Ugh.. Maintenant, je ne peux rien traduire dans le CMS, meme en utilisant i18n::set_locale("fr_FR"). J'ai remarque qu'il n'y a pas de fr_FR.php dans dataobject_manager/lang. Mais je devrais au moins pouvoir traduire le CMS.

Pour ne pas remplir le forum avec une langue etrangere, allons-y a continuer cette conversation par email. Veuillez me contacter par mon site web http://www.carlinowebdesign.com. Je voudrai probablement un facon de regarder et editer ton code (FTP, par example).

Avatar
DsX

Community Member, 178 Posts

23 February 2010 at 9:20am

Edited: 23/02/2010 9:39am

Sorry, I don't speak french (although being Canadian I should brush up ;)

I just installed and all has gone well except for a similar (perhaps the same) problem.
I have this text:

<% sprintf(_t('DataObjectManager.ADDITEM','Add %s',PR_MEDIUM,'Add [name]'),an Album) %>

appearing over my albums-tab, add album button.

I am able to add an album, and associated images, and have done so. So for the most part it is working... but the ADD buttons for photos also has code over it instead of the correct text:

<% sprintf(_t('DataObjectManager.ADDITEM','Add %s',PR_MEDIUM,'Add [name]'),Images to "gear-frontpage-slideshow") %>

(prettyphoto is not working either.. I haven't tested all but some do work)

I appreciate any help you might be able to give.

I am using ver:
image_gallery-r352
dataobject_manager-r371
swfupload-r369
and SilverStrip 2.3.6

Go to Top