Re: [Arches] Re: Accessing languages via Django

2017-05-15 Thread Adam Cox
Hi Andrea, looks like the link to your documentation from this effort doesn't work anymore. Would you be able to make it available again? I'm not sure how much of it will be applicable to v4, but it may be worth including in the wiki documentation. Thanks! Adam On Tuesday, July 12, 2016 at

Re: [Arches] Re: Accessing languages via Django

2016-07-12 Thread zerbini . eamena
Dear All, I have compiled a preliminary set of guidelines to adapting Arches for fully multilingual support. You will find this document here: https://github.com/azerbini/eamena2/blob/master/Making%20Arches%20Multilingual.pdf Please do let me know your thoughts/doubts/problems. Best, Andrea

Re: [Arches] Re: Accessing languages via Django

2016-07-12 Thread Alexei Peters
That's wonderful! Glad I could help. Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 On Tue, Jul 12, 2016 at 8:08 AM, wrote: > Alexei, > > Thank you for this. Indeed, it led me to solving the problem. I will now > prepare a short how-to guide

Re: [Arches] Re: Accessing languages via Django

2016-07-12 Thread zerbini . eamena
Alexei, Thank you for this. Indeed, it led me to solving the problem. I will now prepare a short how-to guide to making Arches multilingual, with screenshots, and will make it available on this thread. On Monday, July 11, 2016 at 7:38:50 PM UTC+1, Alexei Peters wrote: > > Hi Andrea, > I'm

Re: [Arches] Re: Accessing languages via Django

2016-07-11 Thread Alexei Peters
Hi Andrea, I'm still unsure when this is happening, but I'm going to take a stab at this anyway! :) I'm making this assumption, that the dropdowns (eg SITE_FUNCTION_CERTAINTY_TYPE.E55) are being populated only with the concepts in the selected language. That is if I've set the site to display

Re: [Arches] Re: Accessing languages via Django

2016-07-06 Thread zerbini . eamena
Alexei, I have narrowed it down a bit further. The writable computed observable that is returned by getEditedNode correctly reads the values retrieved by the method getEditedBranch(), but then, if the concept is in Arabic, it does not pass it to the "write" callback, despite the variable 'ret'

Re: [Arches] Re: Accessing languages via Django

2016-07-04 Thread zerbini . eamena
Hi Alexei, I have been debugging branch-list.js, and particularly the method getEditedNode. It would appear that the problem lies with the viewModel not correctly picking up the labels when the language selected is not the one with which the branches were originally saved. The form data is

Re: [Arches] Re: Accessing languages via Django

2016-06-29 Thread 'Lucy Fletcher-Jones' via Arches Project
of the team. Lucy - Original Message - From: zerbini.eam...@gmail.com To: Arches Project Sent: Tuesday, June 28, 2016 12:53 AM Subject: Re: [Arches] Re: Accessing languages via Django Hi Lucy, I am doing just that these days. However, I still miss one critical step

Re: [Arches] Re: Accessing languages via Django

2016-06-27 Thread Alexei Peters
Hi Andrea, Have you confirmed that you're getting all the data in all languages when a form loads, but that somehow the client side code is filtering based on language? The "load" method in forms.py would potentially allow a user to only load data with a specific language code, you're code isn't

Re: [Arches] Re: Accessing languages via Django

2016-06-27 Thread zerbini . eamena
Hi Lucy, I am doing just that these days. However, I still miss one critical step, that concerning to editing branches (see my last question for Alexei above). I have managed to introduce a second language in the Languages selection menu in the header, add multilanguage support in the E55

Re: [Arches] Re: Accessing languages via Django

2016-06-17 Thread zerbini . eamena
Dear Alexei, I have got it to work: https://github.com/azerbini/eamena2/blob/app/models/forms.py I was modifying the wrong method, in entity.py instead of looking into app/models/forms and changing that get_nodes. My bad. Now, the problem is that, for whatever reason (and unrelated to my

Re: [Arches] Re: Accessing languages via Django

2016-06-16 Thread Alexei Peters
Hi Andrea, I'll have to look into this. Cheers, Alexei Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 On Wed, Jun 15, 2016 at 10:43 AM, wrote: > A small update. I have been able to bypass the indexing problem by > commenting off lines 228-30

Re: [Arches] Re: Accessing languages via Django

2016-06-15 Thread zerbini . eamena
Hi all, In order to fix the visualisation of the already selected branches, I have tried to modify models/entity.py, particularly the get_nodes method, since it is that which calls the labels of concepts already stored in the database (see here for the modifying method:

Re: [Arches] Re: Accessing languages via Django

2016-06-14 Thread zerbini . eamena
All this makes sense Alexei. However, I am still trying to figure out at which point in concept.py (or other python file) does the get_preflabel get called when created a resource graph. I am asking this as I am still unable to see the translated labels in the already selected branches (those,

Re: [Arches] Re: Accessing languages via Django

2016-06-13 Thread Alexei Peters
Hi Andrea, Keep in mind that when you see something like this: def get_preflabel(self, lang=settings.LANGUAGE_CODE) What it means is, use for "lang" the value defined in settings.LANGUAGE_CODE if nothing else is provided. Most of the views take in a lang property as part of the request,

Re: [Arches] Re: Accessing languages via Django

2016-06-13 Thread zerbini . eamena
Thanks Bojan - and thanks Alexei. I have managed to manipulate labels in both the report page and in the E55 dropdowns. However, I am still trying to find out how to manipulate the labels of the already selected branches. Where does the JSON resource graph (which is read by branch-list.js as

Re: [Arches] Re: Accessing languages via Django

2016-06-10 Thread Bojan Kastelic
Hi Andrea, I had a similar problem and I also use request.LANGUAGE_CODE to switch to selected language. In my project I didn't use resource manager (edit pages), but I had the same problem with dropdowns in advanced search . I also edited the function

Re: [Arches] Re: Accessing languages via Django

2016-06-10 Thread zerbini . eamena
In my case Alexei, this wouldn't work as I use the Middleware to operate language changes - settings.LANGUAGE_CODE would remain defaulted to en_US (the only lang code that I have assigned in settings.py). Instead, I have worked around this issue by replacing settings.LANGUAGE_CODE with

Re: [Arches] Re: Accessing languages via Django

2016-06-10 Thread zerbini . eamena
.historicengland.org.uk/ETL #ListEngland > > > > > > *From:* arches...@googlegroups.com [mailto: > arches...@googlegroups.com ] *On Behalf Of * > zerbini...@gmail.com > *Sent:* 10 June 2016 16:20 > *To:* Arches Project > *Subject:* Re: [Arches] Re: Accessing la

Re: [Arches] Re: Accessing languages via Django

2016-06-10 Thread Alexei Peters
Hi Andrea, There is a method in the models/concept.py file at line 375 called "get_preflabel" def get_preflabel(self, lang=settings.LANGUAGE_CODE): > ret = [] > if self.values == []: > concept = Concept().get(id=self.id, > include_subconcepts=False,

Re: [Arches] Re: Accessing languages via Django

2016-06-09 Thread Alexei Peters
Hi Andrea, Instead of using altLabels for the Arabic language, you should use prefLabels. Each language can (and should) specify a prefLabel. Once you do that the system should be able to discern the correct label. I'll try and send another email with more detail on how to set up an end point to

Re: [Arches] Re: Accessing languages via Django

2016-06-08 Thread zerbini . eamena
Thank you Alexei. As it happens, I had already,and successfully, set up an Arabic translation of all of the static strings (the ones read by Django's gettext). This works fine, though I am not too happy with having Django automatically select a language based on Middleware: I'd much rather be

Re: [Arches] Re: Accessing languages via Django

2016-06-06 Thread Adam Cox
You're correct, that's not what I was thinking. I know that Arches/Django does support multiple languages for the app's interface, but I haven't explored this option myself yet. I'll be interested to know what you find, and if I can look into it soon I'll let you know. Adam On Mon, Jun 6, 2016

[Arches] Re: Accessing languages via Django

2016-06-06 Thread zerbini . eamena
I am not sure I explained myself correctly Adam. Let me try again: we have translated our entire platform in Arabic, including both the static strings which Django reads via the .mo file and our nodes and concepts. The translations for the latter two have been entered via the RDM as altLabels

[Arches] Re: Accessing languages via Django

2016-06-01 Thread Adam Cox
Hi Andrea, technically this is possible, but I don't think it would do what you are hoping... The Languages dropdown is meant to be configured to allow the user to change the app's interface language, while the language concepts are only meant to be attributes for a resource (the language that