<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thebaker</author_name>
  <author_url>https://blog.hatena.ne.jp/thebaker/</author_url>
  <blog_title>thebakerのブログ</blog_title>
  <blog_url>https://thebaker.hatenablog.com/</blog_url>
  <categories>
    <anon>vim</anon>
    <anon>cakephp3</anon>
  </categories>
  <description>諸々の事情で、既存のソースを多言語対応することになりました。 いろんな箇所に echo &quot;こんにちは&quot; といった具合に辞書を参照しない形でテキストが埋め込まれています。 これを echo __('こんにちは'); に変更したいのだけど、手で書いていたら日が暮れてしまう。 そこでvimのマクロを使うことにしました。 .vimrcに次を書いてください： let @a=':s/\%V.*\%V./&lt;\?= __(''&amp;'') \?&gt;/^M' ※最後のMについてはそのまま入力するのではなく、コントロールキーを押しながらvMと押すと入ります 次に、テキストを辞書への参照に変更したいソースをvimで開いて…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthebaker.hatenablog.com%2Fentry%2F2019%2F03%2F30%2F091140&quot; title=&quot;CakePHP3：既存のソースにローカリゼーションを導入する - thebakerのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-03-30 09:11:40</published>
  <title>CakePHP3：既存のソースにローカリゼーションを導入する</title>
  <type>rich</type>
  <url>https://thebaker.hatenablog.com/entry/2019/03/30/091140</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
