Skip to content

Commit

Permalink
Fix pocket casing in item description window (CleverRaven#56694)
Browse files Browse the repository at this point in the history
* Lowecase pockets

Co-authored-by: Binrui Dong <[email protected]>
  • Loading branch information
Faalagorn and BrettDong authored Apr 21, 2022
1 parent 6804ab9 commit 1023422
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/item_contents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ void item_contents::info( std::vector<iteminfo> &info, const iteminfo_query *par
insert_separation_line( info );
// If there are multiple similar pockets, show their capacity as a set
if( pocket_num[idx] > 1 ) {
info.emplace_back( "DESCRIPTION", string_format( _( "<bold>%d Pockets</bold> with capacity:" ),
info.emplace_back( "DESCRIPTION", string_format( _( "<bold>%d pockets</bold> with capacity:" ),
pocket_num[idx] ) );
} else {
// If this is the only pocket the item has, label it "Total capacity"
Expand Down
4 changes: 2 additions & 2 deletions src/item_pocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,10 +1111,10 @@ void item_pocket::contents_info( std::vector<iteminfo> &info, int pocket_number,
translated_sealed_prefix(),
pocket_number ) );
} else if( is_ablative() && !contents.empty() ) {
info.emplace_back( "DESCRIPTION", string_format( _( "<bold>pocket %d</bold>: %s" ),
info.emplace_back( "DESCRIPTION", string_format( _( "<bold>Pocket %d</bold>: %s" ),
pocket_number, contents.front().display_name() ) );
} else {
info.emplace_back( "DESCRIPTION", string_format( _( "<bold>pocket %d</bold>" ),
info.emplace_back( "DESCRIPTION", string_format( _( "<bold>Pocket %d</bold>" ),
pocket_number ) );
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/iteminfo_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2706,7 +2706,7 @@ TEST_CASE( "pocket info for a multi-pocket item", "[iteminfo][pocket][multiple]"
"<color_c_white>Total capacity</color>:\n"
"Volume: <color_c_yellow>6.00</color> L Weight: <color_c_yellow>4.80</color> kg\n"
"--\n"
"<color_c_white>4 Pockets</color> with capacity:\n"
"<color_c_white>4 pockets</color> with capacity:\n"
"Volume: <color_c_yellow>1.50</color> L Weight: <color_c_yellow>1.20</color> kg\n"
"Item length: <color_c_yellow>0</color> cm to <color_c_yellow>70</color> cm\n"
"Minimum item volume: <color_c_yellow>0.050</color> L\n"
Expand Down

0 comments on commit 1023422

Please sign in to comment.