[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gettext] [bug #56440] xgettext: search in comments
From: |
Cornelius Weiß |
Subject: |
[bug-gettext] [bug #56440] xgettext: search in comments |
Date: |
Wed, 5 Jun 2019 01:44:42 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15 |
URL:
<https://savannah.gnu.org/bugs/?56440>
Summary: xgettext: search in comments
Project: GNU gettext
Submitted by: corneliusweiss
Submitted on: Wed 05 Jun 2019 05:44:40 AM UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Hi,
in our project we have a lot of strings defined in static contexts where
gettext can't run. So we place the getext calls into inline comments (see
examples below).
In the last years we used Python mode for our php/js/xml code without problems
as python does not know the // comment syntax.
Now we want to change to javascript mode to use the brand new es6 template
string multiline feature of xgettext (https://savannah.gnu.org/bugs/?50920).
As javascript uses // as inline comment xgettext ignores these gettext calls.
I did not find an option to force xgettext to include them.
did I miss something or can I kindly file this as feature request.
regards
Cornelius
Example (PHP):
<?php
protected static $_properties = array(
self::FIXED_CALENDARS => array(
//_('Fixed Calendars')
'label' => 'Fixed Calendars',
...
Example (JS)
Tine.Calendar.Model.Attender = Tine.Tinebase.data.Record.create([{
// ngettext('Event', 'Events', n); gettext('Events');
containerName: 'Event',
containersName: 'Events',
...
Example (XML)
<?xml version="1.0" encoding="UTF-8"?>
<config>
<plugin>Calendar_Export_Ods</plugin>
<!-- _('OpenDocument all data') -->
<label>OpenDocument all data</label>
<!-- _('Export event data into ods spreadsheet') -->
<description>Export event data into ods spreadsheet</description>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56440>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug-gettext] [bug #56440] xgettext: search in comments,
Cornelius Weiß <=