aboutsummaryrefslogtreecommitdiffstats
path: root/po/pt_BR.po
Commit message (Expand)AuthorAgeFilesLines
* Update error reporting address.Matthias Andree2014-05-211-11/+11
* Update for 6.3.26 release.Matthias Andree2013-04-231-3/+3
* Prepare 6.3.25 release.Matthias Andree2013-03-191-722/+511
* Update for 6.3.24 release.Matthias Andree2012-12-231-206/+206
* Release 6.3.23.Matthias Andree2012-12-101-220/+244
* Get ready for 6.3.22 release.Matthias Andree2012-08-291-82/+91
* Import translations.Matthias Andree2011-08-211-3/+3
* Freeze strings for release.Matthias Andree2011-06-061-3/+3
* Freeze updated .po files for -rc3.Matthias Andree2011-05-291-1/+1
* Freeze strings for -rc2.Matthias Andree2011-05-261-134/+129
* Freeze line numbers in .po files.Matthias Andree2011-05-231-192/+198
* Get ready for 6.3.19 release.Matthias Andree2010-12-101-97/+118
* Update po/ files.Matthias Andree2010-10-101-63/+63
* Import updated translations.Matthias Andree2010-09-271-375/+425
* Get ready for 6.3.17 release.Matthias Andree2010-05-061-9/+9
* Update translations.Matthias Andree2010-05-061-412/+469
* Release 6.3.16.Matthias Andree2010-04-061-10/+10
* Record po files for 6.3.15 release.Matthias Andree2010-03-281-458/+487
* Update .po translations from TP.Matthias Andree2010-02-051-267/+282
* Update po/ files for 6.3.12 release.Matthias Andree2009-10-051-6/+11
* Mention that users should not make up information.Matthias Andree2009-08-241-22/+22
* Bump version for security release.Matthias Andree2009-08-051-55/+67
* Release 6.3.10.Matthias Andree2009-07-021-1/+1
* Prepare 6.3.10 release.Matthias Andree2009-07-021-462/+497
* Update po/.Matthias Andree2008-11-161-4/+4
* Run 'make update-po' on po/.Matthias Andree2008-11-041-570/+763
* Documentation and program output now /consistently/ claim that theMatthias Andree2008-06-301-1/+1
* Snapshot for 6.2.9-rc9.Matthias Andree2005-11-181-777/+986
* (Automatically) updated line numbers in po filesRob Funk2004-06-181-273/+274
* Add files from ESR's dev directory that weren't under version controlRob Funk2004-06-081-0/+2951
se: lower -= 1 return (upper, lower) def unify_table(table): max_fields = max(map(lambda row: len(row), table)) output = [] for row in table: curr_len = len(row) if curr_len < max_fields: row += [''] * (max_fields - curr_len) output.append(row) return output def split_table_row(row_string): if row_string.find("|") >= 0: # first, strip off the outer table drawings row_string = re.sub(r'^\s*\||\|\s*$', '', row_string) return re.split(r'\s*\|\s*', row_string.strip()) return re.split(r'\s\s+', row_string.rstrip()) def parse_table(raw_lines): select_data_lines = lambda line: not re.match('^[\t +=-]+$', line) lines = filter(select_data_lines, raw_lines) lines = map(split_table_row, lines) return unify_table(lines) def table_line(widths, header=False): if header: linechar = '=' else: linechar = '-' sep = '+' parts = [] for width in widths: parts.append(linechar * width) if parts: parts = [''] + parts + [''] return sep.join(parts) def get_column_widths(table): widths = [] for row in table: num_fields = len(row) # dynamically grow if num_fields >= len(widths): widths.extend([0] * (num_fields - len(widths))) for i in range(num_fields): field_text = row[i] field_width = len(field_text) widths[i] = max(widths[i], field_width) return widths def pad_fields(table, widths=None): """Pads fields of the table, so each row lines up nicely with the others. If the widths param is None, the widths are calculated automatically. """ if widths is None: widths = get_column_widths(table) widths = map(lambda w: ' %-' + str(w) + 's ', widths) # Pad all fields using the calculated widths output = [] for row in table: new_row = [] for i in range(len(row)): col = row[i] col = widths[i] % col.strip() new_row.append(col) output.append(new_row) return output def draw_table(table): if table == []: return [] col_widths = get_column_widths(table) table = pad_fields(table, col_widths) # Reserve room for the spaces col_widths = map(lambda x: x + 2, col_widths) header_line = table_line(col_widths, header=True) normal_line = table_line(col_widths, header=False) output = [header_line] first = True for row in table: output.append("|".join([''] + row + [''])) if first: output.append(header_line) first = False else: output.append(normal_line) return output @bridged def create_table(): upper, lower = get_table_bounds() slice = vim.current.buffer[upper - 1:lower] table = parse_table(slice) slice = draw_table(table) vim.current.buffer[upper - 1:lower] = slice