Personal tools
現在位置: ホーム Users oki's Home

oki's Home Page

oki's front page

よろしくです。

Epoz のちょっとだけ日本語化


Epoz 0.8 用です
__init__.py にて
# The Epoz-Language-Files
'epoz_lang_ja.js':ImageFile('skins/epoz/epoz_lang_ja.js.dtml', globals()),
を加えて、Epoz/skins/epoz に epoz_lang_ja.js.dtml をコピーする。
あと、Plone で CMFPhoto と Epoz を使っている場合、
/portal_skins/epoz/tool_box を次のようにカスタマイズすれば良いかも?
コードの一部分なので、参考にしてください

      <td width="50%">
        <a tal:condition="python: item.isPrincipiaFolderish and item<>here"
           tal:attributes="href string: ${item/absolute_url}/${template/getId}"
           tal:content="item/title_or_id">Title</a>
       
        <b tal:condition="python: not item.isPrincipiaFolderish or item==here"
           tal:content="item/title_or_id">Title</b>

        <a tal:condition="python: item.getTypeInfo().getId()=='Portal Image'"
           tal:attributes="href string:#;
                           onclick string: window.open('${item/absolute_url}','${item/getId}','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=${item/width},height=${item/height}');; ;">
           <img tal:define="max python: 32;"
                tal:attributes="src item/absolute_url;
                                height python: test(item.height < max, item.height, max);" />
        </a>
        <a tal:condition="python: item.getTypeInfo().getId()=='Photo'"
           tal:attributes="href string:#;
                           onclick string: window.open('${item/absolute_url}/variant/mideum','${item/getId}','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=${item/width},height=${item/height}');; ;">
           <img tal:define="max python: 32;"
                tal:attributes="src item/absolute_url;
                                height python: test(item.height < max, item.height, max);" />
        </a>
      </td>

      <td width="25%"
          i18n:translate=""
          tal:content="python:item.getTypeInfo().Title()">Metatype</td>     
           
      <td width="25%" tal:define="url item/absolute_url;">
        <a tal:attributes="href string: #;
                           onclick string: window.opener.CreateLink('${url}');; window.close();; ;"
           i18n:translate="epoz_insert_link">Insert Link</a>
         <div tal:condition="python: item.getTypeInfo().getId()=='Portal Image'">
          <a tal:attributes="href string: #;
                             onclick string: window.opener.CreateImage('${url}');; window.close();; ;"
             i18n:translate="epoz_insert_image">Insert Image</a>
         </div>
         <div tal:condition="python: item.getTypeInfo().getId()=='Photo'">
          <a tal:attributes="href string: #;
                             onclick string: window.opener.CreateImage('${url}/variant/medium');; window.close();; ;"
             i18n:translate="epoz_insert_image">Insert Image</a>
         </div>
      </td>
 

jaCMFSin

CMFSin 0.6.1 用に作成しました

はじめて、プロダクト作ってみました。'euc-jp'とかでエンコーディングされた RDF ファイルとかが CMFSin プロダクトで表示できなかったので…。
それにしても、global, import あたりをキッチリ書かないと動作すれども期待通りにならずに、苦労しました。
JapaneseCodes が必要です。明確に JapaneseCodes を import する文は書いてません。
一応、XML の encoding を見るようにしてます。何も指定が無い場合は、'utf-8'で処理してます。
あと、構造上、スレッドセーフではありません。
とりあえず、まだテスト版です。jaCMFSin.tar.gz
ドキュメントアクション