Sudden problem with translations after applying patch 1.0.9.1

32 views
Skip to first unread message

Alexandre Paes

unread,
Feb 4, 2011, 11:20:21 AM2/4/11
to ICA-AtoM Users
Hi everyone, sorry to be back again with questions from the previous
ICA-AtoM version when the new one seems so great and awesome,
unfortunately we cannot upgrade this installation due to hosting
restrictions, namely the PHP 5.3 requirement for the new version. So
here's my problem on 1.0.9 - 39 as it's related on the admin page.

So i had this report that when duplicating records the dates were not
being properly set on some records and so after googling around i
found the patch to 1.0.9.1 which i applied without any noticeable
problem. Except that when one of the people working with the
application decided to translate some string (this is an installation
using portuguese) suddenly dozens of already translated strings
stopped showing.

The most interesting part about this is that contrary to the
translation files layout mentioned to me by Jésus I had managed to
translate 90% of the system by editing apps/qubit/i18n/pt/messages.xml
instead of working with the ton of pt/messages.xml files spread all
over the installation file system (plugins and so on). So my
conclusion is that after the patch the system started reading all
those spread out xml files instead of just reading that main file like
it was doing for the last couple of months.

Is there any way i can generate all those pesky spread out xml files
from the apps/qubit/i18n/pt/messages.xml ? To make everything so much
worse i notice some of those spread out files translation unit id's
don't match the ones that were defined in the base xml that i'm using.

Sorry for the enormous post but i could really get some help here
before jumping in and having to manually copy a ton of translations
from xml file to xml file.


Best regards,

Alex Paes

Alexandre Paes

unread,
Feb 4, 2011, 11:36:17 AM2/4/11
to ICA-AtoM Users
Ok, so i managed to get this working back again, apparently the person
translating stuff managed to break the apps/qubit/i18n/pt/messages.xml
file by adding & characters instead of using the & thingy.

So fortunately i managed to keep the translations ok without any
manually copying and editing. I would just confirm if my understanding
of the translation system is correct. Basically i now think that the
system will try to find the translated string by first going through
the apps/qubit/i18n/pt/messages.xml file and *only* if that string
isn't found on that master translation file will it look on other
messages.xml files spread out on the system. Is this truth or my
understanding of translations is completely wrong and broken?


Best regards,

Alex Paes

David Juhasz

unread,
Feb 4, 2011, 3:58:44 PM2/4/11
to ica-ato...@googlegroups.com
On 11-02-04 08:36 AM, Alexandre Paes wrote:
> Ok, so i managed to get this working back again, apparently the person
> translating stuff managed to break the apps/qubit/i18n/pt/messages.xml
> file by adding& characters instead of using the& thingy.

>
> So fortunately i managed to keep the translations ok without any
> manually copying and editing. I would just confirm if my understanding
> of the translation system is correct. Basically i now think that the
> system will try to find the translated string by first going through
> the apps/qubit/i18n/pt/messages.xml file and *only* if that string
> isn't found on that master translation file will it look on other
> messages.xml files spread out on the system. Is this truth or my
> understanding of translations is completely wrong and broken?
>
>
> Best regards,
>
> Alex Paes
Hi Alex,

Just to clarify the idea behind having multiple message.xml files is so
plugins are self contained, i.e. they include their own translation
strings. This means that removing a plugin will also remove messages
that are not used in the rest of the application.

I believe the application uses all message.xml files that are relevant
to the current page, including apps/qubit/i18n and any plugin
message.xml files that apply. I'm not sure how conflicts between the
different files are resolved, but it would guess it's entirely arbitrary
based on the order in which the files are read. The translated messages
are found based on matching the source message string, so the
translation ids are not a factor in translating messages.

There is also a command line task which can be used to break the
message.xml files up so that plugin messages are moved to the
appropriate plugin directory.

> php symfony i18n:rectify pt

This will move Portugese strings from apps/qubit/i18n/pt/messages.xml to
the various plugins.


Regards,

--
David Juhasz,
Software Engineer

Artefactual Systems Inc.
www.artefactual.com

Alexandre Paes

unread,
Feb 6, 2011, 12:05:51 PM2/6/11
to ICA-AtoM Users
Hi David,

Thank you so much for your explanation, everything makes a bit more
sense now.

> There is also a command line task which can be used to break the
> message.xml files up so that plugin messages are moved to the
> appropriate plugin directory.
>
>  > php symfony i18n:rectify pt
>
> This will move Portugese strings from apps/qubit/i18n/pt/messages.xml to
> the various plugins.

This is great, does it apply to v1.0.9.1? I ask this because the
rectify command is not documented at all when i run the symfony
command. Specifically on the i18n section i get 3 other commands
'diff', 'extract' and 'find'. I tried them all before i managed to get
everything running great again but couldn't find out what any of these
commands actually did.

By the way, my translation became broken because of a problem I had
already seen but forgot to comment with the community. Some of the
users making translations on our ICA-AtoM installation break the
system. For instance, there's a translation string which original
english text goes like 'End date&dagger'. When this string is
translated through the web 'Translate User Interface' this field gets
saved as 'Data final†', after this, the whole translation
system is completely borked and broken. After manually editing the
messages.xml to have this field be 'Data final†' everything
gets back to working normally again. I believe this is not easily
fixed but does anyon have an idea how one could tackle this situation
in order to prevent future breakage of the system by our users?


Best regards,

Alex Paes

David Juhasz

unread,
Feb 8, 2011, 12:52:43 PM2/8/11
to ica-ato...@googlegroups.com
On 11-02-06 09:05 AM, Alexandre Paes wrote:
This is great, does it apply to v1.0.9.1? I ask this because the
rectify command is not documented at all when i run the symfony
command. Specifically on the i18n section i get 3 other commands
'diff', 'extract' and 'find'. I tried them all before i managed to get
everything running great again but couldn't find out what any of these
commands actually did.

Sorry Alex, the rectify task was introduced in release 1.1, so it won't actually help in your case... however it sounds like it's easier for you if all the translation strings are in the same place (i.e. apps/qubit/i18n) anyway. :)

As for the other i18n tasks:
  • i18n:diff - We (Artefactual) created this task to create a CSV or tab-separated list of any new or deleted translation strings between releases.  We no longer maintain this task, so it may not function properly.
  • i18n:extract - read the code/templates and extract i18n strings into the messages.xml files
  • i18n:find - I've never used this before, but it looks like it lists all i18n strings in the application by originating file
By the way, my translation became broken because of a problem I had
already seen but forgot to comment with the community. Some of the
users making translations on our ICA-AtoM installation break the
system. For instance, there's a translation string which original
english text goes like 'End date&dagger'. When this string is
translated through the web 'Translate User Interface' this field gets
saved as 'Data final†', after this, the whole translation
system is completely borked and broken. After manually editing the
messages.xml to have this field be 'Data final†' everything
gets back to working normally again. I believe this is not easily
fixed but does anyon have an idea how one could tackle this situation
in order to prevent future breakage of the system by our users
Hmm, I would consider that a bug with the translation interface.   It may be a difficult problem to solve if there are legitimate cases where you would want to translate an "&" entity into the "&" character, but I can't think of any such case off the top of my head.

Could you please file this bug in our issue tracking software:
http://code.google.com/p/qubit-toolkit/issues/list

Regards,
David
-- 
David Juhasz,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | P: +1.604.527.2056 | F: +1.604.521.2059

tat...@gmail.com

unread,
Jun 30, 2016, 2:32:24 PM6/30/16
to ICA-AtoM Users, da...@artefactual.com
Hi David,

I am new using ATOM. I am using the 2.2 version.
I need to change some texts in the ISAD template, so I am translating to Brazilian Portuguese some phrases at plugins/sfIsadPlugin/i18n/pt_BR/messages.xml
After i save this file, what should i do so i can see the modifications in the program?

Tati

Dan Gillean

unread,
Jun 30, 2016, 3:41:39 PM6/30/16
to ICA-AtoM Users
Hi Tati,

If you are making translation changes that you think would be of benefit to the entire AtoM community of Brazilian Portuguese users, I might suggest that you consider making your changes in Transifex instead.

In the early days of ICA-AtoM, all translation work had to be done by manual edits to the messages.xml files. This made the process very technical, and solitary - there was no way for translators to collaborate easily. With AtoM 2, we have switched to using an online service called Transifex, that offers free accounts to open source projects. This provides a graphical interface for translation work and allows for collaboration among language teams, review, etc. With each release we pull in the most recent translations - we are currently finalizing the 2.3 release for example, and will soon be pulling in any updates from the AtoM 2.3 Transifex project.

We have some instructions on how to get started with Transifex on our wiki, here: https://wiki.accesstomemory.org/Resources/Translation

Please note that Transifex *just* changed their user interface, and we haven't had a chance to update the screenshots on our wiki yet - so some things will look different. However, the basic instructions should be the same.

One of the problems is that currently we have no way to reconcile local translations made via the Translation module (or by editing the messages.xml files directly) with translations pulled in via Transifex - so if you make local custom translations, you will lose them when you upgrade. You can save your messages.xml file, and then reapply it after upgrading, but this means that none of the new strings included in the upgrade will be translated, or translatable via the user inteface. For this reason, we strongly encourage our international users to manage translations via Transifex whenever possible. It will require further development for us to be able to implement a system that applies local translations on top of Transifex updates during the upgrade process, and so far, no one in the community has been interested in sponsoring such a development.

Since you've already made some changes to your local pt_BR messages.xml file, and if you are not worried about the issues with upgrading this might cause later, I will see if one of our team members has recommendations for making these changes visible. My guess is you will need to do the following: 

(all commands below should be run from the root AtoM directory - if you have followed our recommended 2.2 installation instructions, the path is /usr/share/nginx/atom. Make sure you change to this directory first.)

Clear your application cache:
  • sudo -u www-data php symfony cc

Restart your services:

  • sudo service nginx restart
  • sudo service php5-fpm restart

Repopulate the search index:

  • sudo -u www-data php symfony search:populate

Let us know if that works! If not, I'll ask one of our team members to offer further suggestions.

Cheers,


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/d7408551-e50a-4474-a951-8aff2c328962%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tatiana

unread,
Jun 30, 2016, 5:11:31 PM6/30/16
to ica-ato...@googlegroups.com

Thanks Dan,

Actually some of the translations is just where we can find tips to fill the archival description.

I know it shows only the rules from isad, but in Brazil we use another rule called Nobrade, which is basically the same thing, but changes one or two fields or names.

But, not only that. I work in a public military entity that only works with processes, so we will fill out some registers differently, like, the identifier must be the number of the legal process.

So, this is some kind of changes I will work with.

I am also studying how to do a Nobrade template to send you, so our community can view the description in another rule.

I am going to look at Transifex to try to help you also.

Thanks for the help.

Tati

You received this message because you are subscribed to a topic in the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ica-atom-users/T2YWp89Y0MM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com.

To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.

Dan Gillean

unread,
Jun 30, 2016, 6:34:41 PM6/30/16
to ICA-AtoM Users
Hi Tatiana,

Ah, thank you for clarifying! Yes, if you are introduction customizations based on NOBRADE, then using Transifex will not be the best solution, as that would overwrite the existing ISAD(G) translations. However, if there are other areas of the application where you would like to contribute Brazilian Portuguese translations, we would welcome your assistance! Let me know if you have any questions about using Transifex after reviewing the instructions on our wiki.

Regarding developing a separate NOBRADE plugin: there were actually plans to do this for an early version of ICA-AtoM, but unfortunately it never happened. In the meantime, if this is something you are interested in pursuing, this user forum post contains a lot of links that should help you get started:

This page in our documentation also contains some basic guidance on how to build a new theme plugin. Building a new template plugin is of course very different from building a theme plugin, but some of the initial steps to create and register your new plugin might be helpful to you. See:

Finally, you might find our Vagrant box useful as a local development environment. We have some basic instructions on setting up the 2.3 AtoM Vagrant box with VirtualBox here:

On YouTube we have a series of video tutorials about using the command-line in AtoM - these tutorials use the 2.3 Vagrant box, and the first 3 videos will assist you with installation and configuration of Vagrant for local development and testing. See:

Please feel free to ask questions in this forum, and our developers will try to provide some assistance. Be sure to look at our Developer resources on the wiki as well:

In general, we prefer to receive pull requests via GitHub. Information on our code review process, our coding standards, how to contribute code (including via pull request), and more is included in the Development resources linked above. To make it easier for our developers to perform code review, we also prefer a series of smaller commits, instead of one giant pull request.

Let us know how it goes!

Cheers,


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

Reply all
Reply to author
Forward
Message has been deleted
0 new messages