NVDA with Japanese branch
修订版 | bf7aa0f97f6dc0495054a90007c76dc043473557 (tree) |
---|---|
时间 | 2013-06-06 22:17:38 |
作者 | Takuya Nishimoto <nishimotz@gmai...> |
Commiter | Takuya Nishimoto |
experimental work regarding Excel cell range announcement (ti31413)
@@ -309,6 +309,20 @@ class ExcelSelection(ExcelBase): | ||
309 | 309 | def _get_name(self): |
310 | 310 | firstCell=self.excelRangeObject.Item(1) |
311 | 311 | lastCell=self.excelRangeObject.Item(self.excelRangeObject.Count) |
312 | + # nvdajp begin | |
313 | + # if count of cells is less than or equals 6, use their contents. | |
314 | + if self.excelRangeObject.Count <= 6: | |
315 | + items = [] | |
316 | + for p in xrange(1, self.excelRangeObject.Count + 1): | |
317 | + c = self.excelRangeObject.Item(p).Text or _("empty") | |
318 | + items.append(c) | |
319 | + items.append(_("{firstAddress} through {lastAddress}").format(firstAddress=self.getCellAddress(firstCell),lastAddress=self.getCellAddress(lastCell))) | |
320 | + return u' '.join(items) | |
321 | + # if there are more than 6 cells, use first cell, last cell, and the count of cells. | |
322 | + c1 = firstCell.Text or _("empty") | |
323 | + c2 = lastCell.Text or _("empty") | |
324 | + return _("{firstAddress} {firstContent} through {lastAddress} {lastContent} count {cellCount}").format(firstAddress=self.getCellAddress(firstCell),firstContent=c1,lastAddress=self.getCellAddress(lastCell),lastContent=c2,cellCount=self.excelRangeObject.Count) | |
325 | + # nvdajp end | |
312 | 326 | # Translators: This is presented in Excel to show the current selection, for example 'a1 c3 through a10 c10' |
313 | 327 | return _("{firstAddress} {firstContent} through {lastAddress} {lastContent}").format(firstAddress=self.getCellAddress(firstCell),firstContent=firstCell.Text,lastAddress=self.getCellAddress(lastCell),lastContent=lastCell.Text) |
314 | 328 |
@@ -219,6 +219,18 @@ msgstr "日本語6点情報処理点字" | ||
219 | 219 | msgid "%s:%s" |
220 | 220 | msgstr "%s時%s分" |
221 | 221 | |
222 | +#: NVDAObjects/window/excel.py:318 | |
223 | +msgid "empty" | |
224 | +msgstr "空白" | |
225 | + | |
226 | +#: NVDAObjects/window/excel.py:320 | |
227 | +msgid "{firstAddress} through {lastAddress}" | |
228 | +msgstr "{firstAddress}から{lastAddress}" | |
229 | + | |
230 | +#: NVDAObjects/window/excel.py:322 | |
231 | +msgid "{firstAddress} {firstContent} through {lastAddress} {lastContent} count {cellCount}" | |
232 | +msgstr "{firstContent} {firstAddress}から {lastContent} {lastAddress} {cellCount}セル" | |
233 | + | |
222 | 234 | # end of nvdajp |
223 | 235 | |
224 | 236 | #: globalCommands.py:880 |