Hi, Thanks for your post,
I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them. Thanks! Un saludo, Marcos Ortiz Fernández IT Technical Engineer Parque Empresarial Rivas Futura Teléfono: +34 902 196 047 Calle Marie Curie 7 Edificio Beta Fax : +34 915 275 904 28521 - Madrid -----Mensaje original----- De: Pranav Saxena [mailto:pranav.sax...@citrix.com] Enviado el: viernes, 21 de septiembre de 2012 10:38 Para: cloudstack-us...@incubator.apache.org CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz Asunto: RE: Force UI to be in English Hi, Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet ( somewhere around line 225 ) and this check isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- preFilter: function(args) { if( isAdmin() ) { // ADD THIS CHECK ----------------------------------------------------------------------------------------------------------- var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype $.ajax({ url: createURL("listZones"), dataType: "json", async: false, success: function(json) { if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) { zoneObjs = json.listzonesresponse.zone; $(zoneObjs).each(function() { if(this.networktype == "Advanced") { basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed return false; //break each loop } }); } } // ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Thanks, Pranav -----Original Message----- From: Marcos Ortiz [mailto:marcos_or...@anadat.es] Sent: Friday, September 21, 2012 1:42 PM To: <cloudstack-us...@incubator.apache.org> Cc: cloudstack-us...@incubator.apache.org Subject: Re: Force UI to be in English Hi again It is possible to hide the add guest network for all users except for admin? Thanks? Marcos Ortiz Fernández IT Technical Engineer Anadat Consulting El 20/09/2012, a las 16:54, "Pranav Saxena" <pranav.sax...@citrix.com> escribió: > No problems , you are welcome !:) Feel free to address any UI queries to me ! > > Thanks, > Pranav > > -----Original Message----- > From: Marcos Ortiz [mailto:marcos_or...@anadat.es] > Sent: Thursday, September 20, 2012 7:58 PM > To: cloudstack-us...@incubator.apache.org > Subject: RE: Force UI to be in English > > Perfect!!!! > > Thanks a lot!!! > > Un saludo, > > > Marcos Ortiz Fernández > IT Technical Engineer > > Parque Empresarial Rivas Futura Teléfono: +34 902 196 047 > Calle Marie Curie 7 Edificio Beta Fax : +34 915 275 > 904 > 28521 - Madrid > > > > -----Mensaje original----- > De: Pranav Saxena [mailto:pranav.sax...@citrix.com] Enviado el: > jueves, 20 de septiembre de 2012 14:13 > Para: cloudstack-us...@incubator.apache.org > Asunto: RE: Force UI to be in English > > Then , I guess you could try out one thing - as shown in the patch > below > 1) Comment out the first line ( shown below ) where it uses browser's > default language ( Spanish in your case) > 2) Leave the second line uncommented ( English one ) > 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) > . > > <%-- <option value=""></option> <!-- when this blank option is > selected, browsers default language will be used --> --%> > > <option value="en"><fmt:message > key="label.lang.english"/></option> > > <%-- <option value="ja"><fmt:message > key="label.lang.japanese"/></option> > <option > value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%> > > Thanks, > Pranav > > -----Original Message----- > From: Marcos Ortiz [mailto:marcos_or...@anadat.es] > Sent: Thursday, September 20, 2012 5:37 PM > To: cloudstack-us...@incubator.apache.org > Subject: RE: Force UI to be in English > > Hi, > > Yes, but this option take the default language for the browser, in my case > spanish, i need to web load by default in english instead spanish without > change the browser locales. > > I try your option but do not work for me. > > Thanks for your help > > Un saludo, > > > Marcos Ortiz Fernández > IT Technical Engineer > > Parque Empresarial Rivas Futura Teléfono: +34 902 196 047 > Calle Marie Curie 7 Edificio Beta Fax : +34 915 275 > 904 > 28521 - Madrid > > > > -----Mensaje original----- > De: Pranav Saxena [mailto:pranav.sax...@citrix.com] Enviado el: > jueves, 20 de septiembre de 2012 14:03 > Para: cloudstack-us...@incubator.apache.org > Asunto: RE: Force UI to be in English > > You could try commenting out the below mentioned portion of the code in > index. jsp file by putting <%-- and --%> at the beginning and at the end > as shown below . This will hide all the options in the drop down for > selecting the language type . This works for me. > > <%-- <option value=""></option> <!-- > when this blank option is selected, browsers default language will be used --> > <option value="en"><fmt:message > key="label.lang.english"/></option> > <option value="ja"><fmt:message > key="label.lang.japanese"/></option> > <option > value="zh_CN"><fmt:message key="label.lang.chinese"/></option> > --%> > > > Thanks, > Pranav > -----Original Message----- > From: Marcos Ortiz [mailto:marcos_or...@anadat.es] > Sent: Thursday, September 20, 2012 5:27 PM > To: cloudstack-us...@incubator.apache.org > Subject: RE: Force UI to be in English > > Hi Mat > > Do not work for me > > Un saludo, > > > Marcos Ortiz Fernández > IT Technical Engineer > > Parque Empresarial Rivas Futura Teléfono: +34 902 196 047 > Calle Marie Curie 7 Edificio Beta Fax : +34 915 275 > 904 > 28521 - Madrid > > > > -----Mensaje original----- > De: Matty Courtney [mailto:matty.court...@citrix.com] > Enviado el: jueves, 20 de septiembre de 2012 12:53 > Para: cloudstack-us...@incubator.apache.org > Asunto: Re: Force UI to be in English > > I haven't had a chance to test this but you could also try changing > <option value="en"> to <option value="en" selected="selected"> in > index.jsp (as well as the changes suggested below) > > > On 20/09/12 8:32 PM, "Marcos Ortiz" <marcos_or...@anadat.es> wrote: > >> Hi, >> >> Whit those changes, i haven´t got the combo box to display language >> and i can´t login >> >> Regards >> >> >> -----Mensaje original----- >> De: Jessica Wang [mailto:jessica.w...@citrix.com] Enviado el: jueves, >> 20 de septiembre de 2012 0:05 >> Para: Marcos Ortiz >> CC: cloudstack-us...@incubator.apache.org >> Asunto: RE: Force UI to be in English >> >> Marcos, >> >> Please try this: >> (1) in "/ui/index.jsp": >> replace >> <div class="select-language"> >> with >> <div class="select-language" style="display:none"> >> >> (2) under "/client/WEB-INF/classes/resources/": >> keep "messages.properties", but delete everything else >> (e.g."messages_es.properties", "messages_ja.properties", >> "messages_zh_CN.properties") >> >> (3) under your tomcat >> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\": >> keep "messages.properties", but delete everything else >> (e.g."messages_es.properties", "messages_ja.properties", >> "messages_zh_CN.properties") >> >> Jessica >> >> -----Original Message----- >> From: Marcos Ortiz [mailto:marcos_or...@anadat.es] >> Sent: Tuesday, September 18, 2012 9:44 PM >> To: Jessica Wang >> Subject: Re: Force UI to be in English >> >> I think i checked this option before and only removes the blank >> option but the web loads with the browser default, I need to select >> English option anyway. >> >> Marcos Ortiz Fernández >> IT Technical Engineer >> Anadat Consulting >> >> >> El 18/09/2012, a las 23:47, "Jessica Wang" <jessica.w...@citrix.com> >> escribió: >> >>> Marcos, >>> >>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x. >>> >>> ==================================================================== >>> = = ============================================================ >>> >>> <div class="select-language"> >>> <select name="language"> >>> <option value=""></option> //************ please remove this >>> line ************ >>> <option value="en"><fmt:message >>> key="label.lang.english"/></option> >>> <option value="ja"><fmt:message >>> key="label.lang.japanese"/></option> >>> <option value="zh_CN"><fmt:message >>> key="label.lang.chinese"/></option> >>> </select> >>> </div> >>> >>> ==================================================================== >>> = = ============================================================ >>> >>> Jessica >>> >>> -----Original Message----- >>> From: Jessica Wang [mailto:jessica.w...@citrix.com] >>> Sent: Tuesday, September 18, 2012 11:17 AM >>> To: marcos_or...@anadat.es; Chiradeep Vittal >>> Cc: cloudstack-dev@incubator.apache.org >>> Subject: RE: Force UI to be in English >>> >>> Marcos, >>> >>> Cloudstack UI is using browser's default language as default. >>> >>> To force UI to be in English instead of in browser's default >>> language, please just remove one line from your \ui\index.jsp >>> >>> ==================================================================== >>> = = ============================================================ >>> >>> <div class="select-language"> >>> <select name="language"> >>> <option value=""></option> //************ please remove this >>> line ************ >>> <option value="en"><fmt:message >>> key="label.lang.english"/></option> >>> <option value="ja"><fmt:message >>> key="label.lang.japanese"/></option> >>> <option value="zh_CN"><fmt:message >>> key="label.lang.chinese"/></option> >>> </select> >>> </div> >>> >>> ==================================================================== >>> = = ============================================================ >>> >>> Jessica >>> >>> >>> >>> -----Original Message----- >>> From: Chiradeep Vittal >>> Sent: Monday, September 17, 2012 10:04 PM >>> To: Jessica Wang >>> Subject: FW: Force UI to be in English >>> >>> >>> >>> On 9/17/12 9:43 PM, "Marcos Ortiz" <marcos_or...@anadat.es> wrote: >>> >>>> Hi all >>>> >>>> I am from Spain and I need to change the default language to >>>> English instead to take the default from the browser. >>>> >>>> I need this in order to avoid the bad translation to Spanish. >>>> >>>> Thanks >>>> >>>> >>>> >>> >> >> >> >> > > > > > > >