今天是2024年7月7日 第27周 星期日

代人,时大变了。

我们生活在大地上,但我们的梦想超越天空。

變更

跳至導覽 跳至搜尋
移除 2 位元組 、 2014年8月29日 (五) 19:45
翻译
行 87: 行 87:  
    
 
    
 
    if i > len or j > len or i < 1 or j < 1 then
 
    if i > len or j > len or i < 1 or j < 1 then
      return str._error( 'String subset index out of range' );
+
      return str._error( ' 截取字符串索引脱离区间' );
 
    end
 
    end
 
    if j < i then
 
    if j < i then
      return str._error( 'String subset indices out of order' );
+
      return str._error( ' 截取字符串指示脱离顺序' );
 
    end
 
    end
 
    
 
    
行 158: 行 158:  
    
 
    
 
    if s == '' then
 
    if s == '' then
      return str._error( 'Target string is empty' );
+
      return str._error( ' 目标字符串是空的' );
 
    end
 
    end
 
    if pattern == '' then
 
    if pattern == '' then
      return str._error( 'Pattern string is empty' );
+
      return str._error( ' 模式字符串是空的' );
 
    end
 
    end
 
    if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
 
    if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
      return str._error( 'Requested start is out of range' );
+
      return str._error( ' 要求的起始点脱离区间' );
 
    end
 
    end
 
    if match_index == 0 then
 
    if match_index == 0 then
      return str._error( 'Match index is out of range' );
+
      return str._error( ' 匹配索引脱离区间' );
 
    end
 
    end
 
    if plain_flag then
 
    if plain_flag then
行 207: 行 207:  
    if result == nil then
 
    if result == nil then
 
      if nomatch == nil then
 
      if nomatch == nil then
        return str._error( 'Match not found' );
+
        return str._error( ' 找不到匹配' );
 
      else
 
      else
 
        return nomatch;
 
        return nomatch;
行 247: 行 247:     
    if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
 
    if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
      return str._error( 'String index out of range' );
+
      return str._error( ' 字符串索引脱离区间' );
 
    end   
 
    end   
 
    
 
    
行 423: 行 423:  
function str._error( error_str )
 
function str._error( error_str )
 
    local frame = mw.getCurrentFrame();
 
    local frame = mw.getCurrentFrame();
    local error_category = frame.args.error_category or 'Errors reported by Module String';
+
    local error_category = frame.args.error_category or ' 字符串模块报告的错误';
 
    local ignore_errors = frame.args.ignore_errors or false;
 
    local ignore_errors = frame.args.ignore_errors or false;
 
    local no_category = frame.args.no_category or false;
 
    local no_category = frame.args.no_category or false;
行 431: 行 431:  
    end
 
    end
 
    
 
    
    local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
+
    local error_str = '<strong class="error"> 字符串模块出错:' .. error_str .. '</strong>';
 
    if error_category ~= '' and not str._getBoolean( no_category ) then
 
    if error_category ~= '' and not str._getBoolean( no_category ) then
 
      error_str = '[[Category:' .. error_category .. ']]' .. error_str;
 
      error_str = '[[Category:' .. error_category .. ']]' .. error_str;
行 456: 行 456:  
      boolean_value = boolean_str;
 
      boolean_value = boolean_str;
 
    else
 
    else
      error( 'No boolean value found' );
+
      error( ' 布尔值找不到' );
 
    end   
 
    end   
 
    return boolean_value
 
    return boolean_value

導覽選單