Skip to content

Commit

Permalink
Let the "owner" be translated (#32740)
Browse files Browse the repository at this point in the history
* Let the "owner" be translated

* Let the "owner" be translated

* Let the "owner" be translated

* Recover accidentally deleted rows
  • Loading branch information
kwl01skz authored and kevingranade committed Jul 30, 2019
1 parent 3e20987 commit ed290b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions lang/extract_json_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def extract_harvest(item):

def extract_bodypart(item):
outfile = get_outfile("bodypart")
writestr(outfile, item["name"])
writestr(outfile, item["name"], context="bodypart_accusative")
writestr(outfile, item["encumbrance_text"])
writestr(outfile, item["heading_singular"], item["heading_plural"])
Expand Down
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ std::string item::info( std::vector<iteminfo> &info, const iteminfo_query *parts
info.push_back( iteminfo( "BASE", string_format( _( "Material: %s" ), material_list ) ) );
}
if( has_owner() ) {
info.push_back( iteminfo( "BASE", string_format( _( "Owner: %s" ), get_owner()->name ) ) );
info.push_back( iteminfo( "BASE", string_format( _( "Owner: %s" ), _( get_owner()->name ) ) ) );
}
if( has_var( "contained_name" ) && parts->test( iteminfo_parts::BASE_CONTENTS ) ) {
info.push_back( iteminfo( "BASE", string_format( _( "Contains: %s" ),
Expand Down
8 changes: 4 additions & 4 deletions src/veh_interact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void veh_interact::do_main_loop()
if( owned_by_player ) {
redraw = do_rename( msg );
} else {
popup( _( "You cannot rename this vehicle as it is owned by: %s." ), veh->get_owner()->name );
popup( _( "You cannot rename this vehicle as it is owned by: %s." ), _( veh->get_owner()->name) );
redraw = true;
}
} else if( action == "SIPHON" ) {
Expand Down Expand Up @@ -397,14 +397,14 @@ void veh_interact::do_main_loop()
redraw = do_assign_crew( msg );
} else {
popup( _( "You cannot assign crew on this vehicle as it is owned by: %s." ),
veh->get_owner()->name );
_( veh->get_owner()->name ) );
redraw = true;
}
} else if( action == "RELABEL" ) {
if( owned_by_player ) {
redraw = do_relabel( msg );
} else {
popup( _( "You cannot relabel this vehicle as it is owned by: %s." ), veh->get_owner()->name );
popup( _( "You cannot relabel this vehicle as it is owned by: %s." ), _( veh->get_owner()->name ) );
redraw = true;
}
} else if( action == "FUEL_LIST_DOWN" ) {
Expand Down Expand Up @@ -2409,7 +2409,7 @@ void veh_interact::display_name()
mvwprintz( w_name, 0, 1, c_light_gray, _( "Name: " ) );
std::string fac_name = veh->get_owner() &&
veh->get_owner() != g->faction_manager_ptr->get( faction_id( "your_followers" ) ) ?
veh->get_owner()->name : _( "Yours" );
_( veh->get_owner()->name ) : _( "Yours" );
mvwprintz( w_name, 0, 1 + utf8_width( _( "Name: " ) ),
veh->get_owner() != g->faction_manager_ptr->get( faction_id( "your_followers" ) ) ? c_light_red :
c_light_green, string_format( _( "%s (%s)" ), veh->name,
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3860,7 +3860,7 @@ bool vehicle::handle_potential_theft( player &p, bool check_only, bool prompt )
if( prompt ) {
if( !query_yn(
_( "This vehicle belongs to: %s, there may be consequences if you are observed interacting with it, continue?" ),
get_owner()->name ) ) {
_( get_owner()->name ) ) ) {
return false;
}
}
Expand Down

0 comments on commit ed290b3

Please sign in to comment.