Skip to content

Commit

Permalink
TESTING MEDICAL UI AND ORCA - CLEAN UP LATER
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroInternalReflection committed Feb 20, 2024
1 parent 1ae123d commit dd19df2
Show file tree
Hide file tree
Showing 7 changed files with 381 additions and 498 deletions.
4 changes: 3 additions & 1 deletion src/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,11 @@ std::string hilite_string( const std::string &text )
pos += new_tag.length();
++color_tag_count;
}
if( color_tag_count < 1 ) {
// Assume c_white for incompletely-tagged strings and untagged strings
if( color_tag_count < 1 || highlighted.substr( 0, 1 ) != "<" ) {
highlighted = colorize( highlighted, h_white );
}

return highlighted;
}

Expand Down
10 changes: 9 additions & 1 deletion src/input_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,17 @@ std::string input_context::get_desc( const std::string &action_descriptor,
return pgettext( "keybinding", "None applicable" );
}

const std::string screen_reader_mode = get_option<std::string>( "SCREEN_READER_MODE" );
const std::string separator = inputs_to_show.size() > 2 ? _( ", or " ) : _( " or " );
std::string rval;
for( size_t i = 0; i < inputs_to_show.size(); ++i ) {
rval += inputs_to_show[i].long_description();
std::string description = inputs_to_show[i].long_description();
if( screen_reader_mode == "orca" ) {
if( description == "?" ) {
description = _( "Question mark" );
}
}
rval += description;

// We're generating a list separated by "," and "or"
if( i + 2 == inputs_to_show.size() ) {
Expand All @@ -270,6 +277,7 @@ std::string input_context::get_desc( const std::string &action_descriptor,
rval += ", ";
}
}

return rval;
}

Expand Down
Loading

0 comments on commit dd19df2

Please sign in to comment.