Skip to content

Commit

Permalink
Refactor code for annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mduan committed May 7, 2013
1 parent e5b5c94 commit f8f4b3f
Show file tree
Hide file tree
Showing 39 changed files with 672 additions and 504 deletions.
1 change: 1 addition & 0 deletions examples/acroforms/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<script type="text/javascript" src="../../src/api.js"></script>
<script type="text/javascript" src="../../src/canvas.js"></script>
<script type="text/javascript" src="../../src/obj.js"></script>
<script type="text/javascript" src="../../src/annotation.js"></script>
<script type="text/javascript" src="../../src/function.js"></script>
<script type="text/javascript" src="../../src/charsets.js"></script>
<script type="text/javascript" src="../../src/cidmaps.js"></script>
Expand Down
1 change: 1 addition & 0 deletions examples/helloworld/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<script type="text/javascript" src="../../src/api.js"></script>
<script type="text/javascript" src="../../src/canvas.js"></script>
<script type="text/javascript" src="../../src/obj.js"></script>
<script type="text/javascript" src="../../src/annotation.js"></script>
<script type="text/javascript" src="../../src/function.js"></script>
<script type="text/javascript" src="../../src/charsets.js"></script>
<script type="text/javascript" src="../../src/cidmaps.js"></script>
Expand Down
5 changes: 4 additions & 1 deletion extensions/firefox/tools/l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@
// Arabic, Hebrew, Farsi, Pashto, Urdu
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr';
}
},

// translate an element or document fragment
translate: translateFragment
};
})(this);

4 changes: 2 additions & 2 deletions l10n/ar/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ page_scale_actual=الحجم الحقيقي
loading_error_indicator=خطأ
loading_error=حدث خطأ أثناء تحميل وثيقه الـPDF

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[ملاحظة {{type}}]
text_annotation_type.alt=[ملاحظة {{type}}]
request_password=الـPDF محمي بكلمة مرور:

printing_not_supported=تحذير: الطباعة ليست مدعومة كليًا في هذا المتصفح.
4 changes: 2 additions & 2 deletions l10n/ca/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ loading_error_indicator=Error
loading_error=Ha ocorregut un error mentres es carregava el PDF.
invalid_file_error=Invàlid o fitxer PDF corrupte.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[Anotació {{type}}]
text_annotation_type.alt=[Anotació {{type}}]
request_password=El PDF està protegit amb una contrasenya:

printing_not_supported=Avís: La impressió no és compatible totalment en aquest navegador.
2 changes: 1 addition & 1 deletion l10n/cs/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rendering_error=Došlo k chybě při vykreslování stránky.
page_label=Stránka:
page_of=z{{pageCount}}
open_file.title=Otevřít soubor
text_annotation_type=[{{type}}Anotace]
text_annotation_type.alt=[{{type}}Anotace]
toggle_slider_label=Přepnout posuvník
thumbs_label=Náhledy
outline_label=Přehled dokumentu
Expand Down
2 changes: 1 addition & 1 deletion l10n/da/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ missing_file_error=Manglende PDF-fil
# "{{type}}" vil blive ersattet af en kommentar type fra en liste
# defineret i PDF specifikationen (32000-1:2008 Table 169 – Annotation types).
# Nogle almindelige typer er f.eks.: "Check", "Text", "Comment" og "Note"
text_annotation_type=[{{type}} Kommentar]
text_annotation_type.alt=[{{type}} Kommentar]
request_password=PDF filen er beskyttet med et kodeord:
invalid_password=Ugyldigt kodeord.

Expand Down
4 changes: 2 additions & 2 deletions l10n/de/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ loading_error_indicator=Fehler
loading_error=Das PDF konnte nicht geladen werden.
invalid_file_error=Ungültige oder beschädigte PDF-Datei.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Annotation]
text_annotation_type.alt=[{{type}} Annotation]
request_password=Das PDF ist passwortgeschützt:

printing_not_supported=Warnung: Drucken wird durch diesen Browser nicht vollständig unterstützt.
Expand Down
4 changes: 2 additions & 2 deletions l10n/en-US/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=An error occurred while loading the PDF.
invalid_file_error=Invalid or corrupted PDF file.
missing_file_error=Missing PDF file.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Annotation]
text_annotation_type.alt=[{{type}} Annotation]
request_password=PDF is protected by a password:
invalid_password=Invalid Password.

Expand Down
2 changes: 1 addition & 1 deletion l10n/es/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ missing_file_error=Falta el archivo PDF.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[Anotación {{type}}]
text_annotation_type.alt=[Anotación {{type}}]
request_password=El archivo PDF está protegido por una contraseña:

printing_not_supported=Aviso: Este navegador no es compatible completamente con la impresión.
Expand Down
4 changes: 2 additions & 2 deletions l10n/fi/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=Virhe on tapahtunut PDF:ää ladattaessa.
invalid_file_error=Virheellinen tai vioittunut PDF tiedosto.
missing_file_error=PDF tiedostoa ei löytynyt.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Selite]
text_annotation_type.alt=[{{type}} Selite]
request_password=PDF on salasanasuojattu:

printing_not_supported=Varoitus: Tämä selain ei täysin tue tulostusta.
Expand Down
2 changes: 1 addition & 1 deletion l10n/fr/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ missing_file_error=Fichier PDF manquant.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[Annotation {{type}}]
text_annotation_type.alt=[Annotation {{type}}]
request_password=Le PDF est protégé par un mot de passe :

printing_not_supported=Attention : l'impression n'est pas totalement prise en charge par ce navigateur.
Expand Down
2 changes: 1 addition & 1 deletion l10n/he/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rendering_error=אירעה שגיאה בעת עיבוד הדף.
page_label=דף:
page_of=מתוך {{pageCount}}
open_file.title=פתיחת קובץ
text_annotation_type=[{{type}} Annotation]
text_annotation_type.alt=[{{type}} Annotation]
toggle_slider_label=מתג החלקה
thumbs_label=תמונות ממוזערות
outline_label=מתאר מסמך
Expand Down
2 changes: 1 addition & 1 deletion l10n/it/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ rendering_error=
page_label=Pagina:
page_of=di {{pageCount}}
open_file.title=Apri File
text_annotation_type=[{{type}} Annotazione]
text_annotation_type.alt=[{{type}} Annotazione]
4 changes: 2 additions & 2 deletions l10n/ja/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=PDF の読み込み中にエラーが発生しました
invalid_file_error=無効または破損した PDF ファイル
missing_file_error=PDF ファイルが見つかりません。

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} 注釈]
text_annotation_type.alt=[{{type}} 注釈]
request_password=PDF はパスワードによって保護されています

printing_not_supported=警告:このブラウザでは印刷が完全にサポートされていません
Expand Down
4 changes: 2 additions & 2 deletions l10n/lt/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=PDF bylos įkelimo metu įvyko klaida.
invalid_file_error=Neteisinga arba pažeista PDF byla.
missing_file_error=Trūksta PDF bylos.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Pastaba]
text_annotation_type.alt=[{{type}} Pastaba]
request_password=PDF byla yra apsaugota slaptažodžiu:

printing_not_supported=Dėmesio: Naršyklė pilnai nepalaiko spausdinimo.
Expand Down
4 changes: 2 additions & 2 deletions l10n/nl/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=Er is een fout opgetreden bij het laden van het PDF-bestand.
invalid_file_error=Ongeldig of corrupt PDF-bestand.
missing_file_error=Ontbrekend PDF-bestand.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}}-aantekening]
text_annotation_type.alt=[{{type}}-aantekening]
request_password=Dit PDF-bestand is beveiligd met een wachtwoord:

printing_not_supported=Waarschuwing: afdrukken wordt niet volledig ondersteund door deze browser.
Expand Down
4 changes: 2 additions & 2 deletions l10n/pl/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=Wystąpił błąd podczas wczytywania pliku PDF.
invalid_file_error=Błędny lub uszkodzony plik PDF.
missing_file_error=Nie znaleziono pliku PDF.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 - Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[Komentarz {{type}}]
text_annotation_type.alt=[Komentarz {{type}}]
request_password=Plik PDF jest chroniony przez hasło:

printing_not_supported=Ostrzeżenie: Drukowanie nie jest w pełni obsługiwane przez tę przeglądarkę.
Expand Down
2 changes: 1 addition & 1 deletion l10n/pt-BR/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ rendering_error=Um erro ocorreu ao apresentar a página.
page_label=Página:
page_of=de {{pageCount}}
open_file.title=Abrir arquivo
text_annotation_type=[{{type}} Anotações]
text_annotation_type.alt=[{{type}} Anotações]
2 changes: 1 addition & 1 deletion l10n/ro/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rendering_error=S-a produs o eroare în timpul procesării paginii.
page_label=Pagina:
page_of=din {{pageCount}}
open_file.title=Deschide fișier
text_annotation_type=[Adnotare {{type}}]
text_annotation_type.alt=[Adnotare {{type}}]
toggle_slider_label=Vedere de ansamblu
thumbs_label=Miniaturi
outline_label=Cuprins
Expand Down
2 changes: 1 addition & 1 deletion l10n/ru/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rendering_error=Произошла ошибка во время создания
page_label=Страница:
page_of=из {{pageCount}}
open_file.title=Открыть файл
text_annotation_type=[Аннотация {{type}}]
text_annotation_type.alt=[Аннотация {{type}}]
toggle_slider_label=Вспомогательная панель
thumbs_label=Уменьшенные изображения
outline_label=Содержание документа
Expand Down
2 changes: 1 addition & 1 deletion l10n/sr/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rendering_error=Дошло је до грешке приликом приказ
page_label=Страна:
page_of=од {{pageCount}}
open_file.title=Отвори датотеку
text_annotation_type=[{{type}} Annotation]
text_annotation_type.alt=[{{type}} Annotation]
toggle_slider_label=Клизач
thumbs_label=Сличице
outline_label=Документи у линијама
Expand Down
4 changes: 2 additions & 2 deletions l10n/sv/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=Ett fel inträffade när PDF-filen laddades.
invalid_file_error=Ogiltig eller korrupt PDF-fil.
missing_file_error=PDF-filen saknas.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}}-anteckning]
text_annotation_type.alt=[{{type}}-anteckning]
request_password=PDF-filen är lösenordsskyddad:

printing_not_supported=Varning: Utskrifter stöds inte fullt ut av denna webbläsare.
Expand Down
4 changes: 2 additions & 2 deletions l10n/tr/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=PDF yüklenirken hata.
invalid_file_error=Geçersiz yada bozuk dosya.
missing_file_error=PDF dosyası bulunamadı.

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Not]
text_annotation_type.alt=[{{type}} Not]
request_password=PDF Şifre ile korunmakta:

printing_not_supported=Uyarı: Yazdırma işlemi bu tarayıcı ile tam desteklenmiyor.
Expand Down
4 changes: 2 additions & 2 deletions l10n/zh-CN/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ loading_error=加载 PDF 文件时出错。
invalid_file_error=PDF 文件无效或已损坏。
missing_file_error=缺失 PDF 文件。

# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} 注解]
text_annotation_type.alt=[{{type}} 注解]
request_password=该 PDF 文档受密码保护:

printing_not_supported=警告:该浏览器不能完全支持打印。
Expand Down
2 changes: 1 addition & 1 deletion l10n/zh-TW/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ missing_file_error=遺失PDF檔案。
# 其他標籤和訊息
# "{{type}}" 用來表示PDF格式規範 (32000-1:2008 Table 169 – Annotation types) 入面所定義的註解種類。
# 一些常見的類型有: "Check"、 "Text"、 "Comment"、 "Note"
text_annotation_type=[{{type}} 註解]
text_annotation_type.alt=[{{type}} 註解]
request_password=PDF檔案受密碼保護:

printing_not_supported=警告:這個瀏覽器不完全支援列印。
Expand Down
1 change: 1 addition & 0 deletions make.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ target.bundle = function(args) {
'api.js',
'canvas.js',
'obj.js',
'annotation.js',
'function.js',
'charsets.js',
'cidmaps.js',
Expand Down
Loading

0 comments on commit f8f4b3f

Please sign in to comment.