anchor.diff:  get_log_string(LogStringId) ->
     case get_lang_mod() of
       undefined ->
  -      "Error: Language module not found~n";
  -
  -    LangMod -> 
  +      ErrorStr = "Error: Language module not found",
  +      logger:error(ErrorStr),
  +      ErrorStr;
  +  
  +    LangMod ->
         get_map_string(LogStringId, LangMod:log_strings())
     end.
   
   
   %%
  +%% Get the block type name and description strings, 
  +%% corresponding to the given block module or block type string
  +%%
  +-spec get_block_type_strings(BlockModule :: module() | string()) -> 
  +                              {module(), string(), string()} | false.
  +
  +get_block_type_strings(BlockModule) ->
  +  case get_lang_mod() of
  +    undefined ->
  +      logger:error("Error: Language module not found"),
  +      false;
  +
  +    LangMod ->
  +      % Search the list of block type strings in the language module
  +      % If BlockModule is an atom, search via the 1st element
  +      % If BlockModule is a string, search via the 2nd element
  +      Key = case is_atom(BlockModule) of
  +        true  -> 1;
  +        false -> 2
  +      end,
  +      lists:keyfind(BlockModule, Key, LangMod:block_type_strings())
  +  end.
  +
  +
  +%%
   %% Get an attribute name string from attribute ID
   %%
  --spec get_attrib_string(AttribStringId :: atom()) -> string().
  -
  -get_attrib_string(AttribStringId) ->
  +-spec get_attrib_string(AttribId :: atom()) -> string().
  +
  +get_attrib_string(AttribId) ->
     case get_lang_mod() of
       undefined -> 
  -      "Error: Language module not found~n";
  -
  -    LangMod -> 
  -      get_map_string(AttribStringId, LangMod:attrib_strings())
  -  end.
  -
  -
  -%%
  -%% Get the block type description, corresponding to the block module
  -%%
  --spec get_block_type_descr(BlockModule :: atom()) -> string().
  -
  -get_block_type_descr(BlockModule) ->
  +      logger:error("Language module not found"),
  +      "NotFound";
  +  
  +    LangMod ->
  +      case lists:keyfind(AttribId, 1, LangMod:attrib_strings()) of
  +        {AttribId, AttribStr} -> AttribStr;
  +
  +        % if AttribId not found in attrib strings, in the language module
  +        % Just return the AttribId as a string
  +        false -> 
  +          logger:warning("~p not in attrib_strings() list", [AttribId]),
  +          atom_to_list(AttribId)
  +      end
  +  end.
  +
  +
  +%%
  +%% Find attribute ID for the given attribute string
  +%% or return not found
  +%% 
  +-spec get_attrib_id(AttribStr :: string()) -> value_name() | {error, not_found}.
  +
  +get_attrib_id(AttribStr) ->
     case get_lang_mod() of
       undefined -> 
  -      "Error: Language module not found~n";
  -
  -    LangMod -> 
  -      get_map_string(BlockModule, LangMod:block_type_descrs())
  -  end.
  +      logger:error("Error: Language module not found"),
  +      {error, not_found};
  +
  +    LangMod ->
  +      case lists:keyfind(AttribStr, 2, LangMod:attrib_strings()) of
  +        {AttribId, AttribStr} -> AttribId;
  +      
  +        false -> {error, not_found}
  +      end
  +  end.
  +
   
   
   %%
  
positive.code: %%% @end
  
  -module(ui_utils).
  
  -author("Mark Sebald").
  
  
negative.code:                      StringsMap :: map()) -> string().
  
  get_map_string(StringId, StringsMap) ->
    try maps:get(StringId, StringsMap) of
      String -> String
    catch
      error:{badmap, StringsMap} -> io_lib:format("Error: bad strings map: ~p~n", [StringsMap]);
      error:{badkey, StringId} -> io_lib:format("Error: string ID: ~p not found~n", [StringId])
    end.
  
  
  