Empty string causes error in GUI translations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
PoEdit report a warning of empty string:
pcbnew/
warning: Empty msgid. It is reserved by GNU gettext:
gettext("") returns the header entry with meta information, not the empty string.
Indeed. In pcbnew/
// Test net class parameters.
for( int row = 0; row < m_grid-
{
int tracksize = ValueFromString( g_UserUnit,
BTW: In pcbnew/
// If this netclass contains errors, add it to the error message
if ( !netclassError.
{
}
Is single <br> tag should be translatable?
description: | updated |
description: | updated |
Changed in kicad: | |
status: | Fix Committed → Fix Released |
Would you please attach these changes as a patch? Empty strings and
HTML tags shouldn't be in translated strings.
On 1/8/2017 7:02 AM, Kerusey Karyu wrote: dialogs/ dialog_ design_ rules.cpp: 994: dialogs/ dialog_ design_ rules.cpp: 994: dialogs/ dialog_ design_ rules.cpp: >GetNumberRows( ); row++ ) >GetRowLabelVal ue( row ) ); >GetNumberRows( ); row++ ) >GetRowLabelVal ue( row ) ); >GetCellValue( row, GRID_TRACKSIZE ) ); >GetCellValue( row, GRID_TRACKSIZE ) ); dialogs/ dialog_ design_ rules.cpp: 1089 IsEmpty( ) ) dialogs/ dialog_ design_ rules.cpp: 994: dialogs/ dialog_ design_ rules.cpp: >GetNumberRows( ); row++ ) >GetRowLabelVal ue( row ) ); >GetCellValue( row, GRID_TRACKSIZE ) ); dialogs/ dialog_ design_ rules.cpp: 1089 IsEmpty( ) ) dialogs/ dialog_ design_ rules.cpp: 1089 IsEmpty( ) )
> ** Description changed:
>
> PoEdit report a warning of empty string:
>
> - pcbnew/
> + pcbnew/
> warning: Empty msgid. It is reserved by GNU gettext:
> gettext("") returns the header entry with meta information, not the empty string.
>
> Indeed. In pcbnew/
>
> - // Test net class parameters.
> - for( int row = 0; row < m_grid-
> - {
> - netclassLabel = GetChars( m_grid-
> - netclassError = _( "" ); // Clear the error for this netclass
> + // Test net class parameters.
> + for( int row = 0; row < m_grid-
> + {
> + netclassLabel = GetChars( m_grid-
> + netclassError = _( "" ); // Clear the error for this netclass
>
> - int tracksize = ValueFromString( g_UserUnit,
> - m_grid-
> + int tracksize = ValueFromString( g_UserUnit,
> + m_grid-
> +
> +
> + BTW: In pcbnew/
> + // If this netclass contains errors, add it to the error message
> + if ( !netclassError.
> + {
> + msg.Printf( _( "Netclass: <b>%s</b><br>" ), netclassLabel );
> + errorMsg += msg;
> + errorMsg += netclassError;
> + errorMsg += _( "<br>" );
> + }
> +
> + The single <br> tag should be translatable?
>
> ** Description changed:
>
> PoEdit report a warning of empty string:
>
> pcbnew/
> warning: Empty msgid. It is reserved by GNU gettext:
> gettext("") returns the header entry with meta information, not the empty string.
>
> Indeed. In pcbnew/
>
> // Test net class parameters.
> for( int row = 0; row < m_grid-
> {
> netclassLabel = GetChars( m_grid-
> netclassError = _( "" ); // Clear the error for this netclass
>
> int tracksize = ValueFromString( g_UserUnit,
> m_grid-
>
> + BTW: In pcbnew/
> + // If this netclass contains errors, add it to the error message
> + if ( !netclassError.
> + {
> + msg.Printf( _( "Netclass: <b>%s</b><br>" ), netclassLabel );
> + errorMsg += msg;
> + errorMsg += netclassError;
> + errorMsg += _( "<br>" );
> + }
>
> - BTW: In pcbnew/
> - // If this netclass contains errors, add it to the error message
> - if ( !netclassError.
> - {
> - msg.P...