knguyen     2004/10/20 19:12:00 CEST

  Modified files:        (Branch: JAHIA-4-0-BRANCH)
    src/views/jsp/jahia/htmleditors/htmlarea 
                                             htmlarea_htmleditor.jsp 
  Log:
  - editor language availability check
  
  Revision  Changes    Path
  1.1.2.4   +13 -2     
jahia/src/views/jsp/jahia/htmleditors/htmlarea/htmlarea_htmleditor.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/views/jsp/jahia/htmleditors/htmlarea/htmlarea_htmleditor.jsp.diff?r1=1.1.2.3&r2=1.1.2.4&f=h
  
  
  
  Index: htmlarea_htmleditor.jsp
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/views/jsp/jahia/htmleditors/htmlarea/Attic/htmlarea_htmleditor.jsp,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- htmlarea_htmleditor.jsp   14 Oct 2004 11:36:14 -0000      1.1.2.3
  +++ htmlarea_htmleditor.jsp   20 Oct 2004 17:12:00 -0000      1.1.2.4
  @@ -51,6 +51,17 @@
                theOldField = "<html><body></body></html>";
        }
   
  +     String editorLang = jParams.getLocale().toString();
  +     // check that the resource exist in this lang
  +     String[] langs = 
{"b5","cz","da","de","ee","el","en","es","fi","fr","gb","he","hu","it","ja-euc","ja-jis","ja-utf8","it","lv","nb","no","pl","pt_br","ro","ru","se","si","vn"};
  +     List arLangs = Arrays.asList(langs);
  +     if ( !arLangs.contains(editorLang) ){
  +             editorLang = jParams.getLocale().getLanguage();
  +             if ( !arLangs.contains(editorLang) ){
  +                     editorLang = "en";
  +             }
  +     }
  +
   %>
   <br>
   <!-- Configure the path to the editor.  We make it relative now, so that the
  @@ -58,12 +69,12 @@
       have it an absolute path, such as '/htmlarea/'. -->
   <script type="text/javascript">
     _editor_url = "<%=request.getContextPath()%>/jsp/jahia/htmleditors/htmlarea/";
  -  _editor_lang = "<%=jParams.getLocale().getLanguage()%>";
  +  _editor_lang = "<%=editorLang%>";
   </script>
   <script type="text/javascript" 
src="<%=request.getContextPath()%>/jsp/jahia/htmleditors/htmlarea/htmlarea.js"></script>
   <script type="text/javascript" 
src="<%=request.getContextPath()%>/jsp/jahia/htmleditors/htmlarea/dialog.js"></script>
   <script type="text/javascript" 
src="<%=request.getContextPath()%>/jsp/jahia/htmleditors/htmlarea/popupwin.js"></script>
  -<script type="text/javascript" 
src="<%=request.getContextPath()%>/jsp/jahia/htmleditors/htmlarea/lang/<%=jParams.getLocale().getLanguage()%>.js"></script>
  +<script type="text/javascript" 
src="<%=request.getContextPath()%>/jsp/jahia/htmleditors/htmlarea/lang/<%=editorLang%>.js"></script>
   
   <style type="text/css">
   html, body {
  

Reply via email to