<blockquote>
<p>Another way might be like:</p>

<div class="highlight highlight-source-c"><pre>#<span class="pl-k">define</span> <span class="pl-en">ADD_KB_CUSTOM_COMMAND</span>(<span class="pl-v">n, key, mod</span>) \
    <span class="pl-en">add_kb</span>(group, GEANY_KEYS_FORMAT_SENTOCMD##n, <span class="pl-c1">NULL</span>, key, mod, \
        <span class="pl-s"><span class="pl-pds">"</span>edit_sentocmd<span class="pl-pds">"</span></span>#n, _(<span class="pl-s"><span class="pl-pds">"</span>Send to Custom Command <span class="pl-pds">"</span></span>#n), NULL)</pre></div>
</blockquote>

<p>That's not acceptable, because translators need to be able to move the number if needed.</p>

<blockquote>
<p>Alternatively, we could use <code>g_intern_string()</code> which will copy the given string, then we can free our formatted one, to avoid "leaking" it</p>
</blockquote>

<p>Mmyeah, not really different, but indeed.</p>

<blockquote>
<p>Not sure it's a worthwhile improvement. It replaces one line with another (although shorter) one but adds the macro. plus having to malloc.</p>
</blockquote>

<p>Me neither.  It actually looks kinda ugly to me, that's why I PRd it for opinions.  The advantage is that ther's then only 1 translation instead of 9, but the code here isn't very nice, and the translations now already exist, so…</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1058#issuecomment-230904073">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/ABDrJ6ht3mwEV3Vt_kQPRqk9HEAGrtzAks5qTBaegaJpZM4IxerS">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ_BNv7F4Tm-C2RVyLFq341Lcswy-ks5qTBaegaJpZM4IxerS.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/1058#issuecomment-230904073"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>