Skip to content

Commit

Permalink
Merge pull request #35 from imobachgs/i18n-fixes-configured
Browse files Browse the repository at this point in the history
Fix "not configured" and "not available" translations
  • Loading branch information
imobachgs committed Oct 7, 2016
2 parents 9232d24 + e4e739e commit 9763064
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.17.27
2.17.28
7 changes: 7 additions & 0 deletions package/yast2-fcoe-client.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Oct 6 14:27:50 UTC 2016 - igonzalezsosa@suse.com

- Fixed more translation issues related to bug
bsc#928909
- 2.17.28

-------------------------------------------------------------------
Mon Oct 3 15:22:52 UTC 2016 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion src/FcoeClient.ycp
Expand Up @@ -729,7 +729,7 @@ global boolean DetectNetworkCards()
if ( vlan_info[card["dev_name"]:""]:"" == "" )
{
// Interface down or FCoE not enabled on the switch - we can't do anything here.
fcoe_vlan_interface = _("not available");
fcoe_vlan_interface = NOT_AVAILABLE;
}
else
{
Expand Down
11 changes: 10 additions & 1 deletion src/complex.ycp
Expand Up @@ -179,6 +179,15 @@ void AdjustButtons()
}
}

// Helper function to translate the FCOE VLAN interface in case it's needed.
string humanized_interface(string interface) {
if (interface == FcoeClient::NOT_AVAILABLE)
return _("not available");
else if (interface == FcoeClient::NOT_CONFIGURED)
return _("not configured");
else
return interface;
}

void InitInterfacesDialog (string id) {
y2milestone( "Init interfaces dialog" );
Expand All @@ -192,7 +201,7 @@ void InitInterfacesDialog (string id) {

foreach ( map card, (list<map>)netcards, {
table_items = add( table_items,
`item(`id(row), card["dev_name"]:"", card["mac_addr"]:"", card["device"]:"", card["fcoe_vlan"]:"",
`item(`id(row), card["dev_name"]:"", card["mac_addr"]:"", card["device"]:"", humanized_interface(card["fcoe_vlan"]:""),
card["fcoe_enable"]:"", card["dcb_required"]:"", card["auto_vlan"]:"", card["dcb_capable"]:"" )
);
row = row + 1;
Expand Down

0 comments on commit 9763064

Please sign in to comment.