summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-09 15:39:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-09 15:39:58 +0000
commit57e18e35fa577eb5f5f9428a1bb3dd7245fb539f (patch)
treea18d63864a0e339b6185501e97561d73096376ae
parentInitial commit. (diff)
downloadmailredirect-upstream.tar.xz
mailredirect-upstream.zip
Adding upstream version 0.10.2.upstream/0.10.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--LICENSE373
-rw-r--r--README10
-rw-r--r--chrome.manifest67
-rw-r--r--chrome/content/aw.js1070
-rw-r--r--chrome/content/awPre31.js949
-rw-r--r--chrome/content/mailredirect-compose-seamonkey.xul355
-rw-r--r--chrome/content/mailredirect-compose-thunderbird.xul384
-rw-r--r--chrome/content/mailredirect-compose.js3382
-rw-r--r--chrome/content/mailredirect-debug.js84
-rw-r--r--chrome/content/mailredirect-prefs-moz.xul163
-rw-r--r--chrome/content/mailredirect-prefs.js324
-rw-r--r--chrome/content/mailredirect-prefs.xul168
-rw-r--r--chrome/content/mailredirect.js447
-rw-r--r--chrome/content/mailredirect.xul94
-rw-r--r--chrome/content/mailredirectCustomizeToolbar.xul15
-rw-r--r--chrome/content/mailredirectMessengerOverlay.xul25
-rw-r--r--chrome/content/mailredirectPrefsOverlay.xul20
-rw-r--r--chrome/content/msgHdrViewOverlay.xul34
-rw-r--r--chrome/content/xtooltip.xml54
-rw-r--r--chrome/icons/default/msgMailRedirectWindow.icobin0 -> 5430 bytes
-rw-r--r--chrome/icons/default/msgMailRedirectWindow.xpm140
-rw-r--r--chrome/icons/default/msgMailRedirectWindow16.xpm61
-rw-r--r--chrome/locale/ar/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/ar/mailredirect-compose.properties55
-rw-r--r--chrome/locale/ar/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/ar/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/ar/mailredirect.dtd9
-rw-r--r--chrome/locale/ar/mailredirect.properties4
-rw-r--r--chrome/locale/ar/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/bg/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/bg/mailredirect-compose.properties54
-rw-r--r--chrome/locale/bg/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/bg/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/bg/mailredirect.dtd9
-rw-r--r--chrome/locale/bg/mailredirect.properties4
-rw-r--r--chrome/locale/bg/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/ca/mailredirect-compose.dtd68
-rw-r--r--chrome/locale/ca/mailredirect-compose.properties54
-rw-r--r--chrome/locale/ca/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/ca/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/ca/mailredirect.dtd9
-rw-r--r--chrome/locale/ca/mailredirect.properties4
-rw-r--r--chrome/locale/ca/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/cs/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/cs/mailredirect-compose.properties54
-rw-r--r--chrome/locale/cs/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/cs/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/cs/mailredirect.dtd9
-rw-r--r--chrome/locale/cs/mailredirect.properties4
-rw-r--r--chrome/locale/cs/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/da/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/da/mailredirect-compose.properties54
-rw-r--r--chrome/locale/da/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/da/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/da/mailredirect.dtd9
-rw-r--r--chrome/locale/da/mailredirect.properties4
-rw-r--r--chrome/locale/da/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/de/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/de/mailredirect-compose.properties54
-rw-r--r--chrome/locale/de/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/de/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/de/mailredirect.dtd9
-rw-r--r--chrome/locale/de/mailredirect.properties4
-rw-r--r--chrome/locale/de/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/el/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/el/mailredirect-compose.properties54
-rw-r--r--chrome/locale/el/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/el/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/el/mailredirect.dtd9
-rw-r--r--chrome/locale/el/mailredirect.properties4
-rw-r--r--chrome/locale/el/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/en-US/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/en-US/mailredirect-compose.properties54
-rw-r--r--chrome/locale/en-US/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/en-US/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/en-US/mailredirect.dtd9
-rw-r--r--chrome/locale/en-US/mailredirect.properties4
-rw-r--r--chrome/locale/en-US/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/es-AR/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/es-AR/mailredirect-compose.properties54
-rw-r--r--chrome/locale/es-AR/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/es-AR/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/es-AR/mailredirect.dtd9
-rw-r--r--chrome/locale/es-AR/mailredirect.properties4
-rw-r--r--chrome/locale/es-AR/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/es-ES/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/es-ES/mailredirect-compose.properties54
-rw-r--r--chrome/locale/es-ES/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/es-ES/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/es-ES/mailredirect.dtd9
-rw-r--r--chrome/locale/es-ES/mailredirect.properties3
-rw-r--r--chrome/locale/es-ES/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/es-MX/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/es-MX/mailredirect-compose.properties54
-rw-r--r--chrome/locale/es-MX/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/es-MX/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/es-MX/mailredirect.dtd9
-rw-r--r--chrome/locale/es-MX/mailredirect.properties4
-rw-r--r--chrome/locale/es-MX/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/fi/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/fi/mailredirect-compose.properties54
-rw-r--r--chrome/locale/fi/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/fi/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/fi/mailredirect.dtd9
-rw-r--r--chrome/locale/fi/mailredirect.properties4
-rw-r--r--chrome/locale/fi/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/fr/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/fr/mailredirect-compose.properties54
-rw-r--r--chrome/locale/fr/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/fr/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/fr/mailredirect.dtd9
-rw-r--r--chrome/locale/fr/mailredirect.properties4
-rw-r--r--chrome/locale/fr/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/hu/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/hu/mailredirect-compose.properties54
-rw-r--r--chrome/locale/hu/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/hu/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/hu/mailredirect.dtd9
-rw-r--r--chrome/locale/hu/mailredirect.properties4
-rw-r--r--chrome/locale/hu/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/id/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/id/mailredirect-compose.properties54
-rw-r--r--chrome/locale/id/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/id/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/id/mailredirect.dtd9
-rw-r--r--chrome/locale/id/mailredirect.properties4
-rw-r--r--chrome/locale/id/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/it/mailredirect-compose.dtd70
-rw-r--r--chrome/locale/it/mailredirect-compose.properties54
-rw-r--r--chrome/locale/it/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/it/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/it/mailredirect.dtd9
-rw-r--r--chrome/locale/it/mailredirect.properties4
-rw-r--r--chrome/locale/it/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/ja/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/ja/mailredirect-compose.properties55
-rw-r--r--chrome/locale/ja/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/ja/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/ja/mailredirect.dtd9
-rw-r--r--chrome/locale/ja/mailredirect.properties4
-rw-r--r--chrome/locale/ja/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/lt/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/lt/mailredirect-compose.properties54
-rw-r--r--chrome/locale/lt/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/lt/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/lt/mailredirect.dtd9
-rw-r--r--chrome/locale/lt/mailredirect.properties4
-rw-r--r--chrome/locale/lt/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/nb/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/nb/mailredirect-compose.properties54
-rw-r--r--chrome/locale/nb/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/nb/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/nb/mailredirect.dtd9
-rw-r--r--chrome/locale/nb/mailredirect.properties4
-rw-r--r--chrome/locale/nb/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/nl/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/nl/mailredirect-compose.properties54
-rw-r--r--chrome/locale/nl/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/nl/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/nl/mailredirect.dtd9
-rw-r--r--chrome/locale/nl/mailredirect.properties4
-rw-r--r--chrome/locale/nl/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/pl/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/pl/mailredirect-compose.properties54
-rw-r--r--chrome/locale/pl/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/pl/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/pl/mailredirect.dtd9
-rw-r--r--chrome/locale/pl/mailredirect.properties4
-rw-r--r--chrome/locale/pl/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/pt-BR/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/pt-BR/mailredirect-compose.properties54
-rw-r--r--chrome/locale/pt-BR/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/pt-BR/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/pt-BR/mailredirect.dtd9
-rw-r--r--chrome/locale/pt-BR/mailredirect.properties4
-rw-r--r--chrome/locale/pt-BR/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/pt/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/pt/mailredirect-compose.properties54
-rw-r--r--chrome/locale/pt/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/pt/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/pt/mailredirect.dtd9
-rw-r--r--chrome/locale/pt/mailredirect.properties4
-rw-r--r--chrome/locale/pt/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/ro/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/ro/mailredirect-compose.properties54
-rw-r--r--chrome/locale/ro/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/ro/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/ro/mailredirect.dtd9
-rw-r--r--chrome/locale/ro/mailredirect.properties4
-rw-r--r--chrome/locale/ro/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/ru/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/ru/mailredirect-compose.properties54
-rw-r--r--chrome/locale/ru/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/ru/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/ru/mailredirect.dtd9
-rw-r--r--chrome/locale/ru/mailredirect.properties4
-rw-r--r--chrome/locale/ru/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/sk/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/sk/mailredirect-compose.properties54
-rw-r--r--chrome/locale/sk/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/sk/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/sk/mailredirect.dtd9
-rw-r--r--chrome/locale/sk/mailredirect.properties4
-rw-r--r--chrome/locale/sk/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/sl/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/sl/mailredirect-compose.properties54
-rw-r--r--chrome/locale/sl/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/sl/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/sl/mailredirect.dtd9
-rw-r--r--chrome/locale/sl/mailredirect.properties4
-rw-r--r--chrome/locale/sl/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/sq/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/sq/mailredirect-compose.properties54
-rw-r--r--chrome/locale/sq/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/sq/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/sq/mailredirect.dtd9
-rw-r--r--chrome/locale/sq/mailredirect.properties4
-rw-r--r--chrome/locale/sq/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/sr/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/sr/mailredirect-compose.properties54
-rw-r--r--chrome/locale/sr/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/sr/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/sr/mailredirect.dtd9
-rw-r--r--chrome/locale/sr/mailredirect.properties4
-rw-r--r--chrome/locale/sr/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/sv-SE/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/sv-SE/mailredirect-compose.properties54
-rw-r--r--chrome/locale/sv-SE/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/sv-SE/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/sv-SE/mailredirect.dtd9
-rw-r--r--chrome/locale/sv-SE/mailredirect.properties4
-rw-r--r--chrome/locale/sv-SE/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/tr/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/tr/mailredirect-compose.properties54
-rw-r--r--chrome/locale/tr/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/tr/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/tr/mailredirect.dtd9
-rw-r--r--chrome/locale/tr/mailredirect.properties4
-rw-r--r--chrome/locale/tr/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/uk-UA/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/uk-UA/mailredirect-compose.properties54
-rw-r--r--chrome/locale/uk-UA/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/uk-UA/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/uk-UA/mailredirect.dtd9
-rw-r--r--chrome/locale/uk-UA/mailredirect.properties4
-rw-r--r--chrome/locale/uk-UA/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/zh-CN/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/zh-CN/mailredirect-compose.properties54
-rw-r--r--chrome/locale/zh-CN/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/zh-CN/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/zh-CN/mailredirect.dtd9
-rw-r--r--chrome/locale/zh-CN/mailredirect.properties4
-rw-r--r--chrome/locale/zh-CN/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/locale/zh-TW/mailredirect-compose.dtd69
-rw-r--r--chrome/locale/zh-TW/mailredirect-compose.properties54
-rw-r--r--chrome/locale/zh-TW/mailredirect-prefs.dtd54
-rw-r--r--chrome/locale/zh-TW/mailredirect-prefs.properties4
-rw-r--r--chrome/locale/zh-TW/mailredirect.dtd9
-rw-r--r--chrome/locale/zh-TW/mailredirect.properties4
-rw-r--r--chrome/locale/zh-TW/msgHdrViewOverlay.dtd2
-rw-r--r--chrome/skin/classic/seamonkey/mailredirect-compose.css86
-rw-r--r--chrome/skin/classic/seamonkey/mailredirect-small.pngbin0 -> 3699 bytes
-rw-r--r--chrome/skin/classic/seamonkey/mailredirect-subjectCol.css28
-rw-r--r--chrome/skin/classic/seamonkey/mailredirect.css39
-rw-r--r--chrome/skin/classic/seamonkey/mailredirect.pngbin0 -> 6041 bytes
-rw-r--r--chrome/skin/classic/seamonkey/message-mail-forwarded-redirected.pngbin0 -> 439 bytes
-rw-r--r--chrome/skin/classic/seamonkey/message-mail-redirected.pngbin0 -> 409 bytes
-rw-r--r--chrome/skin/classic/seamonkey/message-mail-replied-forw-redirected.pngbin0 -> 494 bytes
-rw-r--r--chrome/skin/classic/seamonkey/message-mail-replied-redirected.pngbin0 -> 447 bytes
-rw-r--r--chrome/skin/classic/seamonkey/message-news-redirected.pngbin0 -> 363 bytes
-rw-r--r--chrome/skin/classic/seamonkey/messageHeader.css13
-rw-r--r--chrome/skin/classic/thunderbird/aero/mailredirect-compose.css142
-rw-r--r--chrome/skin/classic/thunderbird/aero/mailredirect-subjectCol.css20
-rw-r--r--chrome/skin/classic/thunderbird/aero/mailredirect.css3
-rw-r--r--chrome/skin/classic/thunderbird/aero/messageHeader.css3
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre45/mailredirect-compose.css40
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre45/mailredirect-subjectCol.css20
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre45/mailredirect.css15
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre45/mailredirect.pngbin0 -> 597 bytes
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre45/messageHeader.css7
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre58/mailredirect-compose.css40
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre58/mailredirect-subjectCol.css20
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre58/mailredirect.css15
-rw-r--r--chrome/skin/classic/thunderbird/aeroPre58/messageHeader.css11
-rw-r--r--chrome/skin/classic/thunderbird/mac/mailredirect-compose.css95
-rw-r--r--chrome/skin/classic/thunderbird/mac/mailredirect-subjectCol.css58
-rw-r--r--chrome/skin/classic/thunderbird/mac/mailredirect.css6
-rw-r--r--chrome/skin/classic/thunderbird/mac/messageHeader.css3
-rw-r--r--chrome/skin/classic/thunderbird/macPre45/mailredirect-compose.css40
-rw-r--r--chrome/skin/classic/thunderbird/macPre45/mailredirect-subjectCol.css58
-rw-r--r--chrome/skin/classic/thunderbird/macPre45/mailredirect.css21
-rw-r--r--chrome/skin/classic/thunderbird/macPre45/mailredirect.pngbin0 -> 1026 bytes
-rw-r--r--chrome/skin/classic/thunderbird/macPre45/messageHeader.css8
-rw-r--r--chrome/skin/classic/thunderbird/macPre58/mailredirect-compose.css23
-rw-r--r--chrome/skin/classic/thunderbird/macPre58/mailredirect-subjectCol.css58
-rw-r--r--chrome/skin/classic/thunderbird/macPre58/mailredirect.css9
-rw-r--r--chrome/skin/classic/thunderbird/macPre58/messageHeader.css11
-rw-r--r--chrome/skin/classic/thunderbird/unix/mailredirect-compose.css92
-rw-r--r--chrome/skin/classic/thunderbird/unix/mailredirect-subjectCol.css20
-rw-r--r--chrome/skin/classic/thunderbird/unix/mailredirect.css3
-rw-r--r--chrome/skin/classic/thunderbird/unix/messageHeader.css3
-rw-r--r--chrome/skin/classic/thunderbird/unixPre45/button-redirect.svg3
-rw-r--r--chrome/skin/classic/thunderbird/unixPre45/mailredirect-compose.css40
-rw-r--r--chrome/skin/classic/thunderbird/unixPre45/mailredirect-subjectCol.css20
-rw-r--r--chrome/skin/classic/thunderbird/unixPre45/mailredirect.css29
-rw-r--r--chrome/skin/classic/thunderbird/unixPre45/mailredirect.pngbin0 -> 597 bytes
-rw-r--r--chrome/skin/classic/thunderbird/unixPre45/messageHeader.css7
-rw-r--r--chrome/skin/classic/thunderbird/unixPre58/mailredirect-compose.css24
-rw-r--r--chrome/skin/classic/thunderbird/unixPre58/mailredirect-subjectCol.css20
-rw-r--r--chrome/skin/classic/thunderbird/unixPre58/mailredirect.css15
-rw-r--r--chrome/skin/classic/thunderbird/unixPre58/messageHeader.css11
-rw-r--r--chrome/skin/classic/thunderbird/windows/mailredirect-compose.css46
-rw-r--r--chrome/skin/classic/thunderbird/windows/mailredirect-subjectCol.css20
-rw-r--r--chrome/skin/classic/thunderbird/windows/mailredirect.css29
-rw-r--r--chrome/skin/classic/thunderbird/windows/messageHeader.css8
-rw-r--r--chrome/skin/modern/seamonkey/mailredirect-compose.css75
-rw-r--r--chrome/skin/modern/seamonkey/mailredirect-subjectCol.css28
-rw-r--r--chrome/skin/modern/seamonkey/mailredirect.css19
-rw-r--r--chrome/skin/modern/seamonkey/mailredirect.pngbin0 -> 3560 bytes
-rw-r--r--chrome/skin/modern/seamonkey/message-mail-forwarded-redirected.pngbin0 -> 451 bytes
-rw-r--r--chrome/skin/modern/seamonkey/message-mail-redirected.pngbin0 -> 406 bytes
-rw-r--r--chrome/skin/modern/seamonkey/message-mail-replied-forw-redirected.pngbin0 -> 497 bytes
-rw-r--r--chrome/skin/modern/seamonkey/message-mail-replied-redirected.pngbin0 -> 439 bytes
-rw-r--r--chrome/skin/modern/seamonkey/message-news-redirected.pngbin0 -> 365 bytes
-rw-r--r--chrome/skin/modern/seamonkey/messageHeader.css13
-rw-r--r--chrome/skin/shared/close-act.gifbin0 -> 1016 bytes
-rw-r--r--chrome/skin/shared/close-hov.gifbin0 -> 1022 bytes
-rw-r--r--chrome/skin/shared/close-small.pngbin0 -> 848 bytes
-rw-r--r--chrome/skin/shared/close.gifbin0 -> 1037 bytes
-rw-r--r--chrome/skin/shared/close.pngbin0 -> 572 bytes
-rw-r--r--chrome/skin/shared/close.svg7
-rw-r--r--chrome/skin/shared/mail-toolbar.svg82
-rw-r--r--chrome/skin/shared/mailredirect-prefs.css4
-rw-r--r--chrome/skin/shared/mailredirect-small.pngbin0 -> 1139 bytes
-rw-r--r--chrome/skin/shared/mailredirect.pngbin0 -> 1566 bytes
-rw-r--r--chrome/skin/shared/message-forwarded-redirected.pngbin0 -> 516 bytes
-rw-r--r--chrome/skin/shared/message-mail-forwarded-redirected.pngbin0 -> 718 bytes
-rw-r--r--chrome/skin/shared/message-mail-redirected.pngbin0 -> 634 bytes
-rw-r--r--chrome/skin/shared/message-mail-replied-forw-redirected.pngbin0 -> 743 bytes
-rw-r--r--chrome/skin/shared/message-mail-replied-redirected.pngbin0 -> 645 bytes
-rw-r--r--chrome/skin/shared/message-redirected.pngbin0 -> 450 bytes
-rw-r--r--chrome/skin/shared/message-replied-forwarded-redirected.pngbin0 -> 746 bytes
-rw-r--r--chrome/skin/shared/message-replied-redirected.pngbin0 -> 640 bytes
-rw-r--r--chrome/skin/shared/redirect.svg3
-rw-r--r--chrome/skin/shared/symbol-forwarded-redirected-selected.pngbin0 -> 253 bytes
-rw-r--r--chrome/skin/shared/symbol-forwarded-redirected.pngbin0 -> 265 bytes
-rw-r--r--chrome/skin/shared/symbol-forwarded-selected.pngbin0 -> 176 bytes
-rw-r--r--chrome/skin/shared/symbol-forwarded.pngbin0 -> 193 bytes
-rw-r--r--chrome/skin/shared/symbol-redirected-selected.pngbin0 -> 224 bytes
-rw-r--r--chrome/skin/shared/symbol-redirected.pngbin0 -> 237 bytes
-rw-r--r--chrome/skin/shared/symbol-replied-forwarded-redirected-selected.pngbin0 -> 306 bytes
-rw-r--r--chrome/skin/shared/symbol-replied-forwarded-redirected.pngbin0 -> 321 bytes
-rw-r--r--chrome/skin/shared/symbol-replied-forwarded-selected.pngbin0 -> 256 bytes
-rw-r--r--chrome/skin/shared/symbol-replied-forwarded.pngbin0 -> 345 bytes
-rw-r--r--chrome/skin/shared/symbol-replied-redirected-selected.pngbin0 -> 293 bytes
-rw-r--r--chrome/skin/shared/symbol-replied-redirected.pngbin0 -> 307 bytes
-rw-r--r--defaults/preferences/mailredirect.js2
-rw-r--r--icon.pngbin0 -> 1871 bytes
-rw-r--r--install.rdf68
-rwxr-xr-xmake-amo.sh97
-rwxr-xr-xmake-babelzilla.sh34
-rw-r--r--make-exclude.txt2
-rwxr-xr-xmake-sourceforge.sh93
-rw-r--r--manifest.json22
364 files changed, 16715 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a612ad9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,373 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/README b/README
new file mode 100644
index 0000000..af22dfe
--- /dev/null
+++ b/README
@@ -0,0 +1,10 @@
+This Source Code is subject to the terms of the Mozilla Public License
+version 2.0 (the "License").
+
+The Original Code is Mailredirect Extension.
+The Initial Developer of the Original Code is Paweł Krześniak.
+
+Contributor(s):
+ Paweł Krześniak <pawel.krzesniak@gmail.com>
+ Ronald Wahl <rwahl@gmx.de>
+ Onno Ekker <o.e.ekker@gmail.com>
diff --git a/chrome.manifest b/chrome.manifest
new file mode 100644
index 0000000..7cb5ef4
--- /dev/null
+++ b/chrome.manifest
@@ -0,0 +1,67 @@
+content mailredirect chrome/content/
+content mailredirect-icons chrome/icons/
+
+overlay chrome://messenger/content/messenger.xul chrome://mailredirect/content/mailredirectMessengerOverlay.xul
+overlay chrome://messenger/content/msgHdrViewOverlay.xul chrome://mailredirect/content/msgHdrViewOverlay.xul platformversion<61
+overlay chrome://messenger/content/messenger.xul chrome://mailredirect/content/msgHdrViewOverlay.xul platformversion>=61
+overlay chrome://messenger/content/messageWindow.xul chrome://mailredirect/content/msgHdrViewOverlay.xul platformversion>=61
+overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mailredirect/content/mailredirect.xul platformversion<61
+overlay chrome://messenger/content/messenger.xul chrome://mailredirect/content/mailredirect.xul platformversion>=61
+overlay chrome://messenger/content/messageWindow.xul chrome://mailredirect/content/mailredirect.xul platformversion>=61
+overlay chrome://global/content/customizeToolbar.xul chrome://mailredirect/content/mailredirectCustomizeToolbar.xul platformversion<=58.0b3
+overlay chrome://messenger/content/customizeToolbar.xul chrome://mailredirect/content/mailredirectCustomizeToolbar.xul platformversion>=59.0a1
+# Add options to Seamonkey prefs
+overlay chrome://communicator/content/pref/preferences.xul chrome://mailredirect/content/mailredirectPrefsOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
+
+override chrome://mailredirect/content/aw.js chrome://mailredirect/content/awPre31.js platformversion<31.0
+
+locale mailredirect en-US chrome/locale/en-US/
+locale mailredirect ar chrome/locale/ar/
+locale mailredirect bg chrome/locale/bg/
+locale mailredirect ca chrome/locale/ca/
+locale mailredirect cs chrome/locale/cs/
+locale mailredirect da chrome/locale/da/
+locale mailredirect de chrome/locale/de/
+locale mailredirect el chrome/locale/el/
+locale mailredirect es-AR chrome/locale/es-AR/
+locale mailredirect es-ES chrome/locale/es-ES/
+locale mailredirect es-MX chrome/locale/es-MX/
+locale mailredirect fi chrome/locale/fi/
+locale mailredirect fr chrome/locale/fr/
+locale mailredirect hu chrome/locale/hu/
+locale mailredirect id chrome/locale/id/
+locale mailredirect it chrome/locale/it/
+locale mailredirect ja chrome/locale/ja/
+locale mailredirect lt chrome/locale/lt/
+locale mailredirect nb chrome/locale/nb/
+locale mailredirect nl chrome/locale/nl/
+locale mailredirect pl chrome/locale/pl/
+locale mailredirect pt chrome/locale/pt/
+locale mailredirect pt-BR chrome/locale/pt-BR/
+locale mailredirect ro chrome/locale/ro/
+locale mailredirect ru chrome/locale/ru/
+locale mailredirect sk chrome/locale/sk/
+locale mailredirect sl chrome/locale/sl/
+locale mailredirect sq chrome/locale/sq/
+locale mailredirect sr chrome/locale/sr/
+locale mailredirect sv-SE chrome/locale/sv-SE/
+locale mailredirect tr chrome/locale/tr/
+locale mailredirect uk-UA chrome/locale/uk-UA/
+locale mailredirect zh-CN chrome/locale/zh-CN/
+locale mailredirect zh-TW chrome/locale/zh-TW/
+
+skin mailredirect classic/1.0 chrome/skin/shared/
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/aero/ application={3550f703-e582-4d05-9a08-453d09bdfdc6}
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/aeroPre58/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion<58 os=WINNT osversion>=6.1
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/aeroPre45/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion<45 os=WINNT osversion>=6.1
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/windows/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} os=WINNT osversion<6.1
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/unix/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion>=58 os=Linux
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/unixPre58/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion<58 os=Linux
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/unixPre45/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion<45 os=Linux
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/mac/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion>=58 os=Darwin
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/macPre58/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion<58 os=Darwin
+skin mailredirect-os classic/1.0 chrome/skin/classic/thunderbird/macPre45/ application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion<45 os=Darwin
+skin mailredirect-os classic/1.0 chrome/skin/classic/seamonkey/ application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
+
+skin mailredirect modern/1.0 chrome/skin/shared/
+skin mailredirect-os modern/1.0 chrome/skin/modern/seamonkey/ application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
diff --git a/chrome/content/aw.js b/chrome/content/aw.js
new file mode 100644
index 0000000..ec37e19
--- /dev/null
+++ b/chrome/content/aw.js
@@ -0,0 +1,1070 @@
+// based on http://dxr.mozilla.org/comm-central/source/comm/mail/components/compose/content/addressingWidgetOverlay.js
+
+"use strict";
+
+Components.utils.import("resource://gre/modules/Services.jsm"); // Gecko 2+ (TB3.3)
+try {
+ // mailServices.js has been renamed MailServices.jsm in TB63
+ Components.utils.import("resource:///modules/MailServices.jsm");
+} catch(ex) {
+ Components.utils.import("resource:///modules/mailServices.js"); // Gecko 5+ (TB5)
+}
+
+top.MAX_RECIPIENTS = 1; /* for the initial listitem created in the XUL */
+
+var inputElementType = "";
+var selectElementType = "";
+var selectElementIndexTable = null;
+
+var gNumberOfCols = 0;
+
+var gDragService = Cc["@mozilla.org/widget/dragservice;1"].
+ getService(Ci.nsIDragService);
+
+function awGetMaxRecipients()
+{
+ return top.MAX_RECIPIENTS;
+}
+
+function awGetNumberOfCols()
+{
+ if (gNumberOfCols === 0) {
+ var listbox = document.getElementById("addressingWidget");
+ var listCols = listbox.getElementsByTagName("treecol");
+ gNumberOfCols = listCols.length;
+ if (!gNumberOfCols) {
+ gNumberOfCols = 1; /* if no cols defined, that means we have only one! */
+ }
+ }
+
+ return gNumberOfCols;
+}
+
+/**
+ * Adjust the default and minimum number of visible recipient rows for addressingWidget
+ */
+function awInitializeNumberOfRowsShown()
+{
+ let msgHeadersToolbar = document.getElementById("MsgHeadersToolbar");
+ let addressingWidget = document.getElementById("addressingWidget");
+ let addressingWidgetItem = addressingWidget.getElementsByClassName("addressingWidgetItem")[0];
+ let awNumRowsShownDefault =
+ Services.prefs.getIntPref("extensions.mailredirect.addresswidget.numRowsShownDefault");
+
+ // Work around bug 966655: extraHeight 2 pixels for msgHeadersToolbar ensures
+ // visibility of recipient rows per awNumRowsShownDefault and prevents scrollbar
+ // on empty Address Widget, depending on OS screen resolution dpi scaling
+ // (> 100%; thresholds differ).
+ let extraHeight = 2;
+
+ // Set minimum number of rows shown for address widget, per hardwired
+ // rows="1" attribute of addressingWidget, to prevent resizing the
+ // subject and format toolbar over the address widget.
+ // This lets users shrink the address widget to one row (with delicate UX)
+ // and thus maximize the space available for composition body,
+ // especially on small screens.
+ msgHeadersToolbar.minHeight = msgHeadersToolbar.boxObject.height;
+
+ // Set default number of rows shown for address widget.
+ addressingWidget.setAttribute("rows", awNumRowsShownDefault);
+ addressingWidget.height = awNumRowsShownDefault * addressingWidgetItem.boxObject.height +
+ extraHeight;
+
+ // Update addressingWidget internals.
+ awCreateOrRemoveDummyRows();
+}
+
+function awInputElementName()
+{
+ if (inputElementType === "") {
+ inputElementType = document.getElementById("addressCol2#1").localName;
+ }
+ return inputElementType;
+}
+
+function awSelectElementName()
+{
+ if (selectElementType === "") {
+ selectElementType = document.getElementById("addressCol1#1").localName;
+ }
+ return selectElementType;
+}
+
+// TODO: replace awGetSelectItemIndex with recipient type index constants
+
+function awGetSelectItemIndex(itemData)
+{
+ if (selectElementIndexTable === null) {
+ selectElementIndexTable = new Object();
+ var selectElem = document.getElementById("addressCol1#1");
+ for (var i = 0; i < selectElem.childNodes[0].childNodes.length; i++) {
+ var aData = selectElem.childNodes[0].childNodes[i].getAttribute("value");
+ selectElementIndexTable[aData] = i;
+ }
+ }
+
+ return selectElementIndexTable[itemData];
+}
+
+function Recipients2CompFields(msgCompFields)
+{
+ if (!msgCompFields) {
+ dumper.dump("Message Compose Error: msgCompFields is null (ExtractRecipients)");
+ return;
+ }
+
+ var i = 1;
+ var addrTo = "";
+ var addrCc = "";
+ var addrBcc = "";
+ var to_Sep = "";
+ var cc_Sep = "";
+ var bcc_Sep = "";
+
+ var recipientType;
+ var inputField;
+ var fieldValue;
+ var recipient;
+ while ((inputField = awGetInputElement(i))) {
+ fieldValue = inputField.value;
+
+ if (fieldValue !== "") {
+ recipientType = awGetPopupElement(i).value;
+ recipient = null;
+
+ switch (recipientType) {
+ case "addr_to" :
+ case "addr_cc" :
+ case "addr_bcc" :
+ try {
+ let headerParser = MailServices.headerParser;
+ recipient =
+ headerParser.makeFromDisplayAddress(fieldValue, {}).map(fullValue =>
+ headerParser.makeMimeAddress(fullValue.name, fullValue.email))
+ .join(", ");
+ } catch (ex) {
+ recipient = fieldValue;
+ }
+ break;
+ }
+
+ switch (recipientType) {
+ case "addr_to" : addrTo += to_Sep + recipient; to_Sep = ","; break;
+ case "addr_cc" : addrCc += cc_Sep + recipient; cc_Sep = ","; break;
+ case "addr_bcc" : addrBcc += bcc_Sep + recipient; bcc_Sep = ","; break;
+ }
+ }
+ i ++;
+ }
+
+ msgCompFields.to = addrTo;
+ msgCompFields.cc = addrCc;
+ msgCompFields.bcc = addrBcc;
+}
+
+function awSetInputAndPopupId(inputElem, popupElem, rowNumber)
+{
+ popupElem.id = "addressCol1#" + rowNumber;
+ inputElem.id = "addressCol2#" + rowNumber;
+ inputElem.setAttribute("aria-labelledby", popupElem.id);
+}
+
+/**
+ * Set value of the recipient input field at row rowNumber and set up
+ * the recipient type menulist.
+ *
+ * @param inputElem recipient input element
+ * @param inputValue recipient value (address)
+ * @param popupElem recipient type menulist element
+ * @param popupValue
+ * @param aNotifyRecipientsChanged Notify that the recipients have changed.
+ * Generally we notify unless recipients are
+ * added in batch when the caller takes care
+ * of the notification.
+ */
+function awSetInputAndPopupValue(inputElem, inputValue, popupElem, popupValue, rowNumber, aNotifyRecipientsChanged = true)
+{
+ inputElem.value = inputValue.trimLeft();
+
+ popupElem.selectedItem = popupElem.childNodes[0].childNodes[awGetSelectItemIndex(popupValue)];
+
+ if (rowNumber >= 0) {
+ awSetInputAndPopupId(inputElem, popupElem, rowNumber);
+ }
+
+ _awSetAutoComplete(popupElem, inputElem);
+
+ if (aNotifyRecipientsChanged) {
+ onRecipientsChanged(true);
+ }
+}
+
+function _awSetInputAndPopup(inputValue, popupValue, parentNode, templateNode)
+{
+ top.MAX_RECIPIENTS++;
+
+ var newNode = templateNode.cloneNode(true);
+ parentNode.appendChild(newNode); // we need to insert the new node before we set the value of the select element!
+
+ var input = newNode.getElementsByTagName(awInputElementName());
+ var select = newNode.getElementsByTagName(awSelectElementName());
+
+ if (input && input.length === 1 && select && select.length === 1) {
+ awSetInputAndPopupValue(input[0], inputValue, select[0], popupValue, top.MAX_RECIPIENTS)
+ }
+}
+
+/**
+ * Adds a batch of new rows matching recipientType and drops in the array of addresses.
+ *
+ * @param aRecipientType Type of recipient, e.g. "addr_to".
+ * @param aAddressArray An array of recipient addresses (strings) to add.
+ */
+function awAddRecipientsArray(aRecipientType, aAddressArray)
+{
+ // Find rows that are empty so that we can fill them.
+ let emptyRows = [];
+ for (let row = 1; row <= top.MAX_RECIPIENTS; row ++) {
+ if (awGetInputElement(row).value == "") {
+ emptyRows.push(row);
+ }
+ }
+
+ // Push the new recipients into the found empty rows or append new rows when needed.
+ let row = 1;
+ for (let address of aAddressArray) {
+ if (emptyRows.length > 0) {
+ row = emptyRows.shift();
+ } else {
+ awAppendNewRow(false);
+ row = top.MAX_RECIPIENTS;
+ }
+
+ awSetInputAndPopupValue(awGetInputElement(row), address, awGetPopupElement(row), aRecipientType,
+ row, false);
+ }
+
+ // Be sure we still have an empty row left.
+ if ((emptyRows.length == 0) && (awGetInputElement(top.MAX_RECIPIENTS).value != "")) {
+ // Insert empty row at the end and focus.
+ awAppendNewRow(true);
+ awSetInputAndPopupValue(awGetInputElement(top.MAX_RECIPIENTS), "",
+ awGetPopupElement(top.MAX_RECIPIENTS), "addr_to",
+ top.MAX_RECIPIENTS, false);
+ } else {
+ // Focus the next empty row, if any, or the pre-existing empty last row.
+ row = (emptyRows.length > 0) ? emptyRows.shift() : top.MAX_RECIPIENTS;
+ awSetFocus(row, awGetInputElement(row));
+ }
+
+ onRecipientsChanged(true);
+}
+
+/**
+ * Adds a new row matching recipientType and drops in the single address.
+ *
+ * This is mostly used by addons, even though they should use AddRecipient().
+ *
+ * @param aRecipientType Type of recipient, e.g. addr_to.
+ * @param aAddress A string with recipient address.
+ */
+function awAddRecipient(recipientType, address)
+{
+ for (var row = 1; row <= top.MAX_RECIPIENTS; row++) {
+ if (awGetInputElement(row).value === "") {
+ break;
+ }
+ }
+
+ if (row > top.MAX_RECIPIENTS) {
+ awAppendNewRow(false);
+ }
+ awSetInputAndPopupValue(awGetInputElement(row), address, awGetPopupElement(row), recipientType, row);
+
+ /* be sure we still have an empty row left at the end */
+ if (row === top.MAX_RECIPIENTS) {
+ awAppendNewRow(true);
+ awSetInputAndPopupValue(awGetInputElement(top.MAX_RECIPIENTS), "", awGetPopupElement(top.MAX_RECIPIENTS), recipientType, top.MAX_RECIPIENTS);
+ }
+}
+
+function awCleanupRows()
+{
+ var maxRecipients = top.MAX_RECIPIENTS;
+ var rowID = 1;
+
+ for (var row = 1; row <= maxRecipients; row++) {
+ var inputElem = awGetInputElement(row);
+ if (inputElem.value === "" && row < maxRecipients) {
+ awRemoveRow(awGetRowByInputElement(inputElem));
+ } else {
+ awSetInputAndPopupId(inputElem, awGetPopupElement(row), rowID);
+ rowID++;
+ }
+ }
+}
+
+function awDeleteRow(rowToDelete)
+{
+ /* When we delete a row, we must reset the id of other rows in order to not break the sequence */
+ var maxRecipients = top.MAX_RECIPIENTS;
+ awRemoveRow(rowToDelete);
+
+ // assume 2 column update (input and popup)
+ for (var row = rowToDelete + 1; row <= maxRecipients; row++) {
+ awSetInputAndPopupId(awGetInputElement(row), awGetPopupElement(row), (row-1));
+ }
+ updateSendLock();
+}
+
+function awClickEmptySpace(target, setFocus)
+{
+ if (document.getElementById("addressCol2#1").disabled ||
+ target === null ||
+ target.localName !== "hbox") {
+ return;
+ }
+
+ var lastInput = awGetInputElement(top.MAX_RECIPIENTS);
+
+ if (lastInput && lastInput.value) {
+ awAppendNewRow(setFocus);
+ } else {
+ if (setFocus) {
+ awSetFocus(top.MAX_RECIPIENTS, lastInput);
+ }
+ }
+}
+
+function awReturnHit(inputElement)
+{
+ var row = awGetRowByInputElement(inputElement);
+ var nextInput = awGetInputElement(row+1);
+
+ if (!nextInput) {
+ if (inputElement.value) {
+ awAppendNewRow(true);
+ }
+ } else {
+ nextInput.select();
+ awSetFocus(row+1, nextInput);
+ }
+}
+
+function awDeleteHit(inputElement)
+{
+ var row = awGetRowByInputElement(inputElement);
+
+ /* 1. don't delete the row if it's the last one remaining, just reset it! */
+ if (top.MAX_RECIPIENTS <= 1) {
+ inputElement.value = "";
+ onRecipientsChanged(true);
+ updateSendLock();
+ return;
+ }
+
+ /* 2. Set the focus to the previous field if possible */
+ if (row > 1) {
+ awSetFocus(row - 1, awGetInputElement(row - 1))
+ } else {
+ // We have to cheat a little bit because the focus will
+ // be set asynchronously after we delete the current row,
+ // therefore the row number still the same! */
+ awSetFocus(1, awGetInputElement(2))
+ }
+
+ /* 3. Delete the row */
+ awDeleteRow(row);
+}
+
+function awAppendNewRow(setFocus)
+{
+ var listbox = document.getElementById("addressingWidget");
+ var listitem1 = awGetListItem(1);
+
+ if (listbox && listitem1) {
+ var lastRecipientType = awGetPopupElement(top.MAX_RECIPIENTS).value;
+
+ var nextDummy = awGetNextDummyRow();
+ var newNode = listitem1.cloneNode(true);
+ if (nextDummy) {
+ listbox.replaceChild(newNode, nextDummy);
+ } else {
+ listbox.appendChild(newNode);
+ }
+
+ top.MAX_RECIPIENTS++;
+
+ var input = newNode.getElementsByTagName(awInputElementName());
+ if (input && input.length === 1) {
+ input[0].value = "";
+
+ // We always clone the first row. The problem is that the first row
+ // could be focused. When we clone that row, we end up with a cloned
+ // XUL textbox that has a focused attribute set. Therefore we think
+ // we're focused and don't properly refocus. The best solution to this
+ // would be to clone a template row that didn't really have any presentation,
+ // rather than using the real visible first row of the listbox.
+ //
+ // For now we'll just put in a hack that ensures the focused attribute
+ // is never copied when the node is cloned.
+ if (input[0].getAttribute("focused") !== "") {
+ input[0].removeAttribute("focused");
+ }
+ }
+ var select = newNode.getElementsByTagName(awSelectElementName());
+ if (select && select.length === 1) {
+ select[0].selectedIndex = awGetSelectItemIndex(lastRecipientType);
+
+ awSetInputAndPopupId(input[0], select[0], top.MAX_RECIPIENTS);
+
+ if (input) {
+ _awSetAutoComplete(select[0], input[0]);
+ }
+ }
+
+ // focus on new input widget
+ if (setFocus && input[0]) {
+ awSetFocus(top.MAX_RECIPIENTS, input[0]);
+ }
+ }
+}
+
+// functions for accessing the elements in the addressing widget
+
+/**
+ * Returns the recipient type popup for a row.
+ *
+ * @param row Index of the recipient row to return. Starts at 1.
+ * @return This returns the menulist (not its child menupopup), despite the function name.
+ */
+function awGetPopupElement(row)
+{
+ return document.getElementById("addressCol1#" + row);
+}
+
+/**
+ * Returns the recipient type popup for a row.
+ *
+ * @param row Index of the recipient row to return. Starts at 1.
+ * @return This returns the menulist (not its child menupopup), despite the function name.
+ */
+function awGetInputElement(row)
+{
+ return document.getElementById("addressCol2#" + row);
+}
+
+function awGetListItem(row)
+{
+ var listbox = document.getElementById("addressingWidget");
+
+ if (listbox && row > 0) {
+ var listitems = listbox.getElementsByTagName("richlistitem");
+ if (listitems && listitems.length >= row) {
+ return listitems[row-1];
+ }
+ }
+ return 0;
+}
+
+function awGetRowByInputElement(inputElement)
+{
+ var row = 0;
+ if (inputElement) {
+ var listitem = inputElement.parentNode.parentNode;
+ while (listitem) {
+ if (listitem.localName === "richlistitem") {
+ ++row;
+ }
+ listitem = listitem.previousSibling;
+ }
+ }
+ return row;
+}
+
+// remove row
+
+function awRemoveRow(row)
+{
+ var listbox = document.getElementById("addressingWidget");
+
+ awRemoveNodeAndChildren(listbox, awGetListItem(row));
+ awFitDummyRows();
+
+ top.MAX_RECIPIENTS--;
+}
+
+function awRemoveNodeAndChildren(parent, nodeToRemove)
+{
+ nodeToRemove.parentNode.removeChild(nodeToRemove);
+}
+
+function awSetFocus(row, inputElement)
+{
+ top.awRow = row;
+ top.awInputElement = inputElement;
+ setTimeout(function() { _awSetFocus() }, 0);
+}
+
+function _awSetFocus()
+{
+ var listbox = document.getElementById("addressingWidget");
+ var theNewRow = awGetListItem(top.awRow);
+ listbox.ensureElementIsVisible(theNewRow);
+ top.awInputElement.focus();
+}
+
+function awTabFromRecipient(element, event)
+{
+ // If we are the last element in the listbox, we don't want to create a new row.
+ if (element == awGetInputElement(top.MAX_RECIPIENTS)) {
+ top.doNotCreateANewRow = true;
+ }
+
+ var row = awGetRowByInputElement(element);
+ if (!event.shiftKey && row < top.MAX_RECIPIENTS) {
+ var listBoxRow = row - 1; // listbox row indices are 0-based, ours are 1-based.
+ var listBox = document.getElementById("addressingWidget");
+ listBox.listBoxObject.ensureIndexIsVisible(listBoxRow + 1);
+ }
+}
+
+function awTabFromMenulist(element, event)
+{
+ var row = awGetRowByInputElement(element);
+ if (event.shiftKey && row > 1) {
+ var listBoxRow = row - 1; // listbox row indices are 0-based, ours are 1-based.
+ var listBox = document.getElementById("addressingWidget");
+ listBox.listBoxObject.ensureIndexIsVisible(listBoxRow - 1);
+ }
+}
+
+function awGetNumberOfRecipients()
+{
+ return top.MAX_RECIPIENTS;
+}
+
+function DragOverAddressingWidget(event)
+{
+ var validFlavor = false;
+ var dragSession = dragSession = gDragService.getCurrentSession();
+
+ if (dragSession.isDataFlavorSupported("text/x-moz-address")) {
+ validFlavor = true;
+ }
+ if (validFlavor) {
+ dragSession.canDrop = true;
+ }
+}
+
+function DropOnAddressingWidget(event)
+{
+ var dragSession = gDragService.getCurrentSession();
+
+ var trans = Cc["@mozilla.org/widget/transferable;1"].
+ createInstance(Ci.nsITransferable);
+ trans.init(getLoadContext());
+ trans.addDataFlavor("text/x-moz-address");
+
+ for (var i = 0; i < dragSession.numDropItems; ++i) {
+ dragSession.getData(trans, i);
+ var dataObj = new Object();
+ var bestFlavor = new Object();
+ var len = new Object();
+ trans.getAnyTransferData(bestFlavor, dataObj, len);
+ if (dataObj) {
+ dataObj = dataObj.value.QueryInterface(Ci.nsISupportsString);
+ }
+ if (!dataObj) {
+ continue;
+ }
+
+ // pull the address out of the data object
+ var address = dataObj.data.substring(0, len.value);
+ if (!address) {
+ continue;
+ }
+ DropRecipient(event.target, address);
+ }
+}
+
+function DropRecipient(target, recipient)
+{
+ // break down and add each address
+ return parseAndAddAddresses(recipient, awGetInputElement(top.MAX_RECIPIENTS).value);
+}
+
+function _awSetAutoComplete(selectElem, inputElem)
+{
+ let params = JSON.parse(inputElem.getAttribute("autocompletesearchparam"));
+ params.type = selectElem.value;
+ inputElem.setAttribute("autocompletesearchparam", JSON.stringify(params));
+}
+
+function awSetAutoComplete(rowNumber)
+{
+ var inputElem = awGetInputElement(rowNumber);
+ var selectElem = awGetPopupElement(rowNumber);
+ _awSetAutoComplete(selectElem, inputElem)
+}
+
+function awRecipientTextCommand(enterEvent, element)
+{
+ // Only add new row when enter was hit (not for tab/autocomplete select).
+ if (enterEvent) {
+ awReturnHit(element);
+ }
+}
+
+// Called when an autocomplete session item is selected and the status of
+// the session it was selected from is nsIAutoCompleteStatus::failureItems.
+//
+// As of this writing, the only way that can happen is when an LDAP
+// autocomplete session returns an error to be displayed to the user.
+//
+// There are hardcoded messages in here, but these are just fallbacks for
+// when string bundles have already failed us.
+//
+function awRecipientErrorCommand(errItem, element)
+{
+ // remove the angle brackets from the general error message to construct
+ // the title for the alert. someday we'll pass this info using a real
+ // exception object, and then this code can go away.
+ //
+ var generalErrString;
+ if (errItem.value != "") {
+ generalErrString = errItem.value.slice(1, errItem.value.length-1);
+ } else {
+ generalErrString = "Unknown LDAP server problem encountered";
+ }
+
+ // try and get the string of the specific error to contruct the complete
+ // err msg, otherwise fall back to something generic. This message is
+ // handed to us as an nsISupportsString in the param slot of the
+ // autocomplete error item, by agreement documented in
+ // nsILDAPAutoCompFormatter.idl
+ //
+ var specificErrString = "";
+ try {
+ var specificError = errItem.param.QueryInterface(Ci.nsISupportsString);
+ specificErrString = specificError.data;
+ } catch (ex) { }
+ if (specificErrString == "") {
+ specificErrString = "Internal error";
+ }
+
+ Services.prompt.alert(window, generalErrString, specificErrString);
+}
+
+function awRecipientKeyPress(event, element)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_RETURN:
+ case KeyEvent.DOM_VK_TAB:
+ // str.includes is new to ECMAScript 6
+ if (typeof String.prototype.includes !== "function") {
+ dumper.dump("awRecipientKeyPress defineProperty includes");
+ Object.defineProperty(String.prototype, "includes", {
+ enumerable: false,
+ configurable: true,
+ writable: false,
+ value: function() {
+ "use strict";
+ var start = 0;
+ if (typeof arguments[1] === "number") {
+ start = arguments[1];
+ }
+ if (this.length < arguments[0].length + start) {
+ return false;
+ } else {
+ return this.indexOf(arguments[0], start) !== -1;
+ }
+ }
+ });
+ }
+ // if the user text contains a comma or a line return, ignore
+ if (element.value.includes(",")) {
+ var addresses = element.value;
+ element.value = ""; // clear out the current line so we don't try to autocomplete it..
+ parseAndAddAddresses(addresses, awGetPopupElement(awGetRowByInputElement(element)).value);
+ } else if (event.keyCode == KeyEvent.DOM_VK_TAB) {
+ awTabFromRecipient(element, event);
+ }
+
+ break;
+ }
+}
+
+function awRecipientKeyDown(event, element)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_DELETE:
+ case KeyEvent.DOM_VK_BACK_SPACE:
+ if (!element.value) {
+ awDeleteHit(element);
+ }
+
+ // We need to stop the event else the listbox will receive it and the
+ // function awKeyDown will be executed!
+ event.stopPropagation();
+ break;
+ }
+}
+
+function awKeyDown(event, listboxElement)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_DELETE:
+ case KeyEvent.DOM_VK_BACK_SPACE:
+ /* Warning, the listboxElement.selectedItems will change everytime we delete a row */
+ var selItems = listboxElement.selectedItems;
+ var length = listboxElement.selectedCount;
+ for (var i = 1; i <= length; i++) {
+ var inputs = listboxElement.selectedItem.getElementsByTagName(awInputElementName());
+ if (inputs && inputs.length === 1) {
+ awDeleteHit(inputs[0]);
+ }
+ }
+ break;
+ }
+}
+
+function awMenulistKeyPress(event, element)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_TAB:
+ awTabFromMenulist(element, event);
+ break;
+ }
+}
+
+/* ::::::::::: addressing widget dummy rows ::::::::::::::::: */
+
+var gAWContentHeight = 0;
+var gAWRowHeight = 0;
+
+function awFitDummyRows()
+{
+ awCalcContentHeight();
+ awCreateOrRemoveDummyRows();
+}
+
+function awCreateOrRemoveDummyRows()
+{
+ let listbox = document.getElementById("addressingWidget");
+ let listboxHeight = listbox.boxObject.height;
+
+ // remove rows to remove scrollbar
+ let kids = listbox.querySelectorAll("[_isDummyRow]");
+ for (let i = kids.length-1; gAWContentHeight > listboxHeight && i >= 0; --i) {
+ gAWContentHeight -= gAWRowHeight;
+ listbox.removeChild(kids[i]);
+ }
+
+ // add rows to fill space
+ if (gAWRowHeight) {
+ while (gAWContentHeight + gAWRowHeight < listboxHeight) {
+ awCreateDummyItem(listbox);
+ gAWContentHeight += gAWRowHeight;
+ }
+ }
+}
+
+function awCalcContentHeight()
+{
+ var listbox = document.getElementById("addressingWidget");
+ var items = listbox.getElementsByTagName("richlistitem");
+
+ gAWContentHeight = 0;
+ if (items.length > 0) {
+ // all rows are forced to a uniform height in xul listboxes, so
+ // find the first listitem with a boxObject and use it as precedent
+ var i = 0;
+ do {
+ gAWRowHeight = items[i].boxObject.height;
+ ++i;
+ } while (i < items.length && !gAWRowHeight);
+ gAWContentHeight = gAWRowHeight*items.length;
+ }
+}
+
+function awCreateDummyItem(aParent)
+{
+ var listbox = document.getElementById("addressingWidget");
+ var item = listbox.getElementsByTagName("richlistitem")[0];
+
+ var titem = document.createElement("richlistitem");
+ titem.setAttribute("_isDummyRow", "true");
+ titem.setAttribute("class", "dummy-row");
+ titem.style.height = item.boxObject.height + "px";
+
+ for (let i = 0; i < awGetNumberOfCols(); i++) {
+ let cell = awCreateDummyCell(titem);
+ if (item.children[i].hasAttribute("style")) {
+ cell.setAttribute("style", item.children[i].getAttribute("style"));
+ }
+ if (item.children[i].hasAttribute("flex")) {
+ cell.setAttribute("flex", item.children[i].getAttribute("flex"));
+ }
+ }
+
+ if (aParent) {
+ aParent.appendChild(titem);
+ }
+ return titem;
+}
+
+function awCreateDummyCell(aParent)
+{
+ var cell = document.createElement("hbox");
+ cell.setAttribute("class", "addressingWidgetCell dummy-row-cell");
+ if (aParent) {
+ aParent.appendChild(cell);
+ }
+
+ return cell;
+}
+
+function awGetNextDummyRow()
+{
+ // gets the next row from the top down
+ return document.querySelector("#addressingWidget > [_isDummyRow]");
+}
+
+function awSizerListen()
+{
+ // when splitter is clicked, fill in necessary dummy rows each time the mouse is moved
+ awCalcContentHeight(); // precalculate
+ document.addEventListener("mousemove", awSizerMouseMove, true);
+ document.addEventListener("mouseup", awSizerMouseUp, false);
+}
+
+function awSizerMouseMove()
+{
+ awCreateOrRemoveDummyRows();
+}
+
+function awSizerMouseUp()
+{
+ document.removeEventListener("mousemove", awSizerMouseMove, true);
+ document.removeEventListener("mouseup", awSizerMouseUp, false);
+}
+
+function awDocumentKeyPress(event)
+{
+ try {
+ var id = event.target.id;
+ if (id.startsWith("addressCol1")) {
+ awMenulistKeyPress(event, event.target);
+ }
+ } catch (e) { }
+}
+
+// Given an arbitrary block of text like a comma delimited list of names or a names separated by spaces,
+// we will try to autocomplete each of the names and then take the FIRST match for each name, adding it the
+// addressing widget on the compose window.
+
+var gAutomatedAutoCompleteListener = null;
+
+function parseAndAddAddresses(addressText, recipientType)
+{
+ // strip any leading >> characters inserted by the autocomplete widget
+ var strippedAddresses = addressText.replace(/.* >> /, "");
+
+ let addresses = MailServices.headerParser.makeFromDisplayAddress(strippedAddresses);
+
+ if (addresses.length > 0) {
+ // we need to set up our own autocomplete session and search for results
+ if (!gAutomatedAutoCompleteListener) {
+ gAutomatedAutoCompleteListener = new AutomatedAutoCompleteHandler();
+ }
+ gAutomatedAutoCompleteListener.init(addresses.map(addr => addr.toString()), recipientType);
+ }
+}
+
+function AutomatedAutoCompleteHandler()
+{
+}
+
+// state driven self contained object which will autocomplete a block of addresses without any UI.
+// force picks the first match and adds it to the addressing widget, then goes on to the next
+// name to complete.
+
+AutomatedAutoCompleteHandler.prototype =
+{
+ param: this,
+ sessionName: null,
+ namesToComplete: null,
+ numNamesToComplete: 0,
+ indexIntoNames: 0,
+ finalAddresses: null,
+
+ numSessionsToSearch: 0,
+ numSessionsSearched: 0,
+ recipientType: null,
+ searchResults: null,
+
+ init: function(namesToComplete, recipientType)
+ {
+ this.indexIntoNames = 0;
+ this.numNamesToComplete = namesToComplete.length;
+ this.namesToComplete = namesToComplete;
+ this.finalAddresses = [];
+
+ this.recipientType = recipientType ? recipientType : "addr_to";
+
+ // set up the auto complete sessions to use
+ this.autoCompleteNextAddress();
+ },
+
+ autoCompleteNextAddress: function()
+ {
+ this.numSessionsToSearch = 0;
+ this.numSessionsSearched = 0;
+ this.searchResults = [];
+
+ if (this.indexIntoNames < this.numNamesToComplete) {
+ if (this.namesToComplete[this.indexIntoNames]) {
+ /* XXX This used to work, until switching to the new toolkit broke it
+ We should fix it see bug 456550.
+ if (typeof String.prototype.includes !== "function") {
+ // dumper.dump("autoCompleteNextAddress defineProperty includes");
+ Object.defineProperty(String.prototype, "includes", {
+ enumerable: false,
+ configurable: true,
+ writable: false,
+ value: function() {
+ "use strict";
+ var start = 0;
+ if (typeof arguments[1] === "number") {
+ start = arguments[1];
+ }
+ if (this.length < arguments[0].length + start) {
+ return false;
+ } else {
+ return this.indexOf(arguments[0], start) !== -1;
+ }
+ }
+ });
+ }
+ if (!this.namesToComplete[this.indexIntoNames].includes("@")) {
+ // don't autocomplete if address has an @ sign in it
+ // make sure total session count is updated before we kick off ANY actual searches
+ if (gAutocompleteSession) {
+ this.numSessionsToSearch++;
+ }
+
+ if (gLDAPSession && gCurrentAutocompleteDirectory) {
+ this.numSessionsToSearch++;
+ }
+
+ if (gAutocompleteSession) {
+ gAutocompleteSession.onAutoComplete(this.namesToComplete[this.indexIntoNames], null, this);
+ // AB searches are actually synchronous. So by the time we get here we have already looked up results.
+
+ // if we WERE going to also do an LDAP lookup, then check to see if we have a valid match in the AB, if we do
+ // don't bother with the LDAP search too just return
+
+ if (gLDAPSession && gCurrentAutocompleteDirectory && this.searchResults[0] && this.searchResults[0].defaultItemIndex !== -1) {
+ this.processAllResults();
+ return;
+ }
+ }
+
+ if (gLDAPSession && gCurrentAutocompleteDirectory) {
+ gLDAPSession.onStartLookup(this.namesToComplete[this.indexIntoNames], null, this);
+ }
+ }
+ */
+
+ if (!this.numSessionsToSearch) {
+ this.processAllResults(); // ldap and ab are turned off, so leave text alone
+ }
+ }
+ } else {
+ this.finish();
+ }
+ },
+
+ onStatus: function(aStatus)
+ {
+ return;
+ },
+
+ onAutoComplete: function(aResults, aStatus)
+ {
+ // store the results until all sessions are done and have reported in
+ if (aResults) {
+ this.searchResults[this.numSessionsSearched] = aResults;
+ }
+
+ this.numSessionsSearched++; // bump our counter
+
+ if (this.numSessionsToSearch <= this.numSessionsSearched) {
+ setTimeout(function() { gAutomatedAutoCompleteListener.processAllResults() } , 0); // we are all done
+ }
+ },
+
+ processAllResults: function()
+ {
+ // Take the first result and add it to the compose window
+ var addressToAdd;
+
+ // loop through the results looking for the non default case (default case is the address book with only one match, the default domain)
+ var sessionIndex;
+
+ var searchResultsForSession;
+
+ for (sessionIndex in this.searchResults) {
+ searchResultsForSession = this.searchResults[sessionIndex];
+ if (searchResultsForSession && searchResultsForSession.defaultItemIndex > -1) {
+ addressToAdd = searchResultsForSession.items.QueryElementAt(searchResultsForSession.defaultItemIndex, Ci.nsIAutoCompleteItem).value;
+ break;
+ }
+ }
+
+ // still no match? loop through looking for the -1 default index
+ if (!addressToAdd) {
+ for (sessionIndex in this.searchResults) {
+ searchResultsForSession = this.searchResults[sessionIndex];
+ if (searchResultsForSession && searchResultsForSession.defaultItemIndex === -1) {
+ addressToAdd = searchResultsForSession.items.QueryElementAt(0, Ci.nsIAutoCompleteItem).value;
+ break;
+ }
+ }
+ }
+
+ // no matches anywhere...just use what we were given
+ if (!addressToAdd) {
+ addressToAdd = this.namesToComplete[this.indexIntoNames];
+ }
+
+ this.finalAddresses.push(addressToAdd);
+
+ this.indexIntoNames++;
+ this.autoCompleteNextAddress();
+ },
+
+ finish: function()
+ {
+ // This will now append all the recipients, set the focus on a new
+ // available row, and make sure it is visible.
+ awAddRecipientsArray(this.recipientType, this.finalAddresses);
+ },
+
+ QueryInterface: function(iid)
+ {
+ if (iid.equals(Ci.nsIAutoCompleteListener) ||
+ iid.equals(Ci.nsISupports)) {
+ return this;
+ }
+ throw Components.results.NS_NOINTERFACE;
+ }
+}
+
+// Returns the load context for the current window
+function getLoadContext() {
+ return window.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsILoadContext);
+}
diff --git a/chrome/content/awPre31.js b/chrome/content/awPre31.js
new file mode 100644
index 0000000..5bea210
--- /dev/null
+++ b/chrome/content/awPre31.js
@@ -0,0 +1,949 @@
+// based on http://dxr.mozilla.org/comm-central/source/comm/mail/components/compose/content/addressingWidgetOverlay.js
+
+"use strict";
+
+Components.utils.import("resource://gre/modules/Services.jsm"); // Gecko 2+ (TB3.3)
+Components.utils.import("resource:///modules/mailServices.js"); // Gecko 5+ (TB5)
+
+top.MAX_RECIPIENTS = 1; /* for the initial listitem created in the XUL */
+
+var inputElementType = "";
+var selectElementType = "";
+var selectElementIndexTable = null;
+
+var gNumberOfCols = 0;
+
+var gDragService = Cc["@mozilla.org/widget/dragservice;1"].
+ getService(Ci.nsIDragService);
+
+function awGetMaxRecipients()
+{
+ return top.MAX_RECIPIENTS;
+}
+
+function awGetNumberOfCols()
+{
+ if (gNumberOfCols === 0) {
+ var listbox = document.getElementById("addressingWidget");
+ var listCols = listbox.getElementsByTagName("treecol");
+ gNumberOfCols = listCols.length;
+ if (!gNumberOfCols) {
+ // if no cols defined, that means we have only one!
+ gNumberOfCols = 1;
+ }
+ }
+
+ return gNumberOfCols;
+}
+
+/**
+ * Adjust the default and minimum number of visible recipient rows for addressingWidget
+ */
+function awInitializeNumberOfRowsShown()
+{
+ let msgHeadersToolbar = document.getElementById("MsgHeadersToolbar");
+ let addressingWidget = document.getElementById("addressingWidget");
+ let addressingWidgetItem = addressingWidget.getElementsByClassName("addressingWidgetItem")[0];
+ let awNumRowsShownDefault =
+ Services.prefs.getIntPref("extensions.mailredirect.addresswidget.numRowsShownDefault");
+
+ // Work around bug 966655: extraHeight 2 pixels for msgHeadersToolbar ensures
+ // visibility of recipient rows per awNumRowsShownDefault and prevents scrollbar
+ // on empty Address Widget, depending on OS screen resolution dpi scaling
+ // (> 100%; thresholds differ).
+ let extraHeight = 2;
+
+ // Set minimum number of rows shown for address widget, per hardwired
+ // rows="1" attribute of addressingWidget, to prevent resizing the
+ // subject and format toolbar over the address widget.
+ // This lets users shrink the address widget to one row (with delicate UX)
+ // and thus maximize the space available for composition body,
+ // especially on small screens.
+ msgHeadersToolbar.minHeight = msgHeadersToolbar.boxObject.height;
+
+ // Set default number of rows shown for address widget.
+ addressingWidget.setAttribute("rows", awNumRowsShownDefault);
+ addressingWidget.height = awNumRowsShownDefault * addressingWidgetItem.boxObject.height +
+ extraHeight;
+
+ // Update addressingWidget internals.
+ awCreateOrRemoveDummyRows();
+}
+
+function awInputElementName()
+{
+ if (inputElementType === "") {
+ inputElementType = document.getElementById("addressCol2#1").localName;
+ }
+ return inputElementType;
+}
+
+function awSelectElementName()
+{
+ if (selectElementType === "") {
+ selectElementType = document.getElementById("addressCol1#1").localName;
+ }
+ return selectElementType;
+}
+
+// TODO: replace awGetSelectItemIndex with recipient type index constants
+
+function awGetSelectItemIndex(itemData)
+{
+ if (selectElementIndexTable === null) {
+ selectElementIndexTable = new Object();
+ var selectElem = document.getElementById("addressCol1#1");
+ for (var i = 0; i < selectElem.childNodes[0].childNodes.length; i++) {
+ var aData = selectElem.childNodes[0].childNodes[i].getAttribute("value");
+ selectElementIndexTable[aData] = i;
+ }
+ }
+
+ return selectElementIndexTable[itemData];
+}
+
+function Recipients2CompFields(msgCompFields)
+{
+ if (!msgCompFields) {
+ dumper.dump("Message Compose Error: msgCompFields is null (ExtractRecipients)");
+ return;
+ }
+
+ var i = 1;
+ var addrTo = "";
+ var addrCc = "";
+ var addrBcc = "";
+ var to_Sep = "";
+ var cc_Sep = "";
+ var bcc_Sep = "";
+
+ var recipientType;
+ var inputField;
+ var fieldValue;
+ var recipient;
+ while ((inputField = awGetInputElement(i))) {
+ fieldValue = inputField.value;
+
+ if (fieldValue === null) {
+ fieldValue = inputField.getAttribute("value");
+ }
+ if (fieldValue !== "") {
+ recipientType = awGetPopupElement(i).selectedItem.getAttribute("value");
+ recipient = null;
+
+ switch (recipientType) {
+ case "addr_to" :
+ case "addr_cc" :
+ case "addr_bcc" :
+ try {
+ recipient = gMimeHeaderParser.reformatUnquotedAddresses(fieldValue);
+ } catch (ex) {
+ recipient = fieldValue;
+ }
+ break;
+ }
+
+ switch (recipientType) {
+ case "addr_to" : addrTo += to_Sep + recipient; to_Sep = ","; break;
+ case "addr_cc" : addrCc += cc_Sep + recipient; cc_Sep = ","; break;
+ case "addr_bcc" : addrBcc += bcc_Sep + recipient; bcc_Sep = ","; break;
+ }
+ }
+ i ++;
+ }
+
+ msgCompFields.to = addrTo;
+ msgCompFields.cc = addrCc;
+ msgCompFields.bcc = addrBcc;
+}
+
+function awSetInputAndPopupId(inputElem, popupElem, rowNumber)
+{
+ popupElem.id = "addressCol1#" + rowNumber;
+ inputElem.id = "addressCol2#" + rowNumber;
+ inputElem.setAttribute("aria-labelledby", popupElem.id);
+}
+
+function awSetInputAndPopupValue(inputElem, inputValue, popupElem, popupValue, rowNumber)
+{
+ inputValue = inputValue.trimLeft();
+
+ inputElem.setAttribute("value", inputValue);
+ inputElem.value = inputValue;
+
+ popupElem.selectedItem = popupElem.childNodes[0].childNodes[awGetSelectItemIndex(popupValue)];
+
+ if (rowNumber >= 0) {
+ awSetInputAndPopupId(inputElem, popupElem, rowNumber);
+ }
+
+ _awSetAutoComplete(popupElem, inputElem);
+
+ onRecipientsChanged(true);
+}
+
+function _awSetInputAndPopup(inputValue, popupValue, parentNode, templateNode)
+{
+ top.MAX_RECIPIENTS++;
+
+ var newNode = templateNode.cloneNode(true);
+ parentNode.appendChild(newNode); // we need to insert the new node before we set the value of the select element!
+
+ var input = newNode.getElementsByTagName(awInputElementName());
+ var select = newNode.getElementsByTagName(awSelectElementName());
+
+ if (input && input.length === 1 && select && select.length === 1) {
+ awSetInputAndPopupValue(input[0], inputValue, select[0], popupValue, top.MAX_RECIPIENTS)
+ }
+}
+
+// this was broken out of awAddRecipients so it can be re-used...adds a new row matching recipientType and
+// drops in the single address.
+function awAddRecipient(recipientType, address)
+{
+ for (var row = 1; row <= top.MAX_RECIPIENTS; row++) {
+ if (awGetInputElement(row).value === "") {
+ break;
+ }
+ }
+
+ if (row > top.MAX_RECIPIENTS) {
+ awAppendNewRow(false);
+ }
+
+ awSetInputAndPopupValue(awGetInputElement(row), address, awGetPopupElement(row), recipientType, row);
+
+ /* be sure we still have an empty row left at the end */
+ if (row === top.MAX_RECIPIENTS) {
+ awAppendNewRow(true);
+ awSetInputAndPopupValue(awGetInputElement(top.MAX_RECIPIENTS), "", awGetPopupElement(top.MAX_RECIPIENTS), recipientType, top.MAX_RECIPIENTS);
+ }
+}
+
+function awCleanupRows()
+{
+ var maxRecipients = top.MAX_RECIPIENTS;
+ var rowID = 1;
+
+ for (var row = 1; row <= maxRecipients; row++) {
+ var inputElem = awGetInputElement(row);
+ if (inputElem.value === "" && row < maxRecipients) {
+ awRemoveRow(awGetRowByInputElement(inputElem));
+ } else {
+ awSetInputAndPopupId(inputElem, awGetPopupElement(row), rowID);
+ rowID++;
+ }
+ }
+}
+
+function awDeleteRow(rowToDelete)
+{
+ /* When we delete a row, we must reset the id of other rows in order to not break the sequence */
+ var maxRecipients = top.MAX_RECIPIENTS;
+ awRemoveRow(rowToDelete);
+
+ // assume 2 column update (input and popup)
+ for (var row = rowToDelete + 1; row <= maxRecipients; row++) {
+ awSetInputAndPopupId(awGetInputElement(row), awGetPopupElement(row), (row-1));
+ }
+ updateSendLock();
+}
+
+function awClickEmptySpace(target, setFocus)
+{
+ if (document.getElementById("addressCol2#1").disabled ||
+ target === null ||
+ target.localName !== "hbox") {
+ return;
+ }
+
+ var lastInput = awGetInputElement(top.MAX_RECIPIENTS);
+
+ if (lastInput && lastInput.value) {
+ awAppendNewRow(setFocus);
+ } else {
+ if (setFocus) {
+ awSetFocus(top.MAX_RECIPIENTS, lastInput);
+ }
+ }
+}
+
+function awReturnHit(inputElement)
+{
+ var row = awGetRowByInputElement(inputElement);
+ var nextInput = awGetInputElement(row+1);
+
+ if (!nextInput) {
+ if (inputElement.value) {
+ awAppendNewRow(true);
+ }
+ } else {
+ nextInput.select();
+ awSetFocus(row+1, nextInput);
+ }
+}
+
+function awDeleteHit(inputElement)
+{
+ var row = awGetRowByInputElement(inputElement);
+
+ /* 1. don't delete the row if it's the last one remaining, just reset it! */
+ if (top.MAX_RECIPIENTS <= 1) {
+ inputElement.value = "";
+ onRecipientsChanged(true);
+ updateSendLock();
+ return;
+ }
+
+ /* 2. Set the focus to the previous field if possible */
+ if (row > 1) {
+ awSetFocus(row - 1, awGetInputElement(row - 1))
+ } else {
+ // We have to cheat a little bit because the focus will
+ // be set asynchronously after we delete the current row,
+ // therefore the row number still the same!
+ awSetFocus(1, awGetInputElement(2))
+ }
+
+ /* 3. Delete the row */
+ awDeleteRow(row);
+}
+
+function awAppendNewRow(setFocus)
+{
+ var listbox = document.getElementById("addressingWidget");
+ var listitem1 = awGetListItem(1);
+
+ if (listbox && listitem1) {
+ var lastRecipientType = awGetPopupElement(top.MAX_RECIPIENTS).selectedItem.getAttribute("value");
+
+ var nextDummy = awGetNextDummyRow();
+ var newNode = listitem1.cloneNode(true);
+ if (nextDummy) {
+ listbox.replaceChild(newNode, nextDummy);
+ } else {
+ listbox.appendChild(newNode);
+ }
+
+ top.MAX_RECIPIENTS++;
+
+ var input = newNode.getElementsByTagName(awInputElementName());
+ if (input && input.length === 1) {
+ var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
+ var versionChecker = Cc["@mozilla.org/xpcom/version-comparator;1"].getService(Ci.nsIVersionComparator);
+
+ input[0].setAttribute("value", "");
+
+ if ((appInfo.ID === THUNDERBIRD_ID && versionChecker.compare(appInfo.version, "26.0a1") < 0) ||
+ (appInfo.ID === SEAMONKEY_ID && versionChecker.compare(appInfo.version, "2.23a1") < 0)) {
+ //this copies the autocomplete sessions list from recipient#1
+ input[0].syncSessions(document.getElementById("addressCol2#1"));
+
+ // also clone the showCommentColumn setting
+ //
+ input[0].showCommentColumn =
+ document.getElementById("addressCol2#1").showCommentColumn;
+ }
+
+ // We always clone the first row. The problem is that the first row
+ // could be focused. When we clone that row, we end up with a cloned
+ // XUL textbox that has a focused attribute set. Therefore we think
+ // we're focused and don't properly refocus. The best solution to this
+ // would be to clone a template row that didn't really have any presentation,
+ // rather than using the real visible first row of the listbox.
+ //
+ // For now we'll just put in a hack that ensures the focused attribute
+ // is never copied when the node is cloned.
+ if (input[0].getAttribute("focused") !== "") {
+ input[0].removeAttribute("focused");
+ }
+ }
+ var select = newNode.getElementsByTagName(awSelectElementName());
+ if (select && select.length === 1) {
+ select[0].selectedIndex = awGetSelectItemIndex(lastRecipientType);
+
+ awSetInputAndPopupId(input[0], select[0], top.MAX_RECIPIENTS);
+
+ if (input) {
+ _awSetAutoComplete(select[0], input[0]);
+ }
+ }
+
+ // focus on new input widget
+ if (setFocus && input[0]) {
+ awSetFocus(top.MAX_RECIPIENTS, input[0]);
+ }
+ }
+}
+
+// functions for accessing the elements in the addressing widget
+
+function awGetPopupElement(row)
+{
+ return document.getElementById("addressCol1#" + row);
+}
+
+function awGetInputElement(row)
+{
+ return document.getElementById("addressCol2#" + row);
+}
+
+function awGetListItem(row)
+{
+ var listbox = document.getElementById("addressingWidget");
+
+ if (listbox && row > 0) {
+ var listitems = listbox.getElementsByTagName("richlistitem");
+ if (listitems && listitems.length >= row) {
+ return listitems[row-1];
+ }
+ }
+ return 0;
+}
+
+function awGetRowByInputElement(inputElement)
+{
+ var row = 0;
+ if (inputElement) {
+ var listitem = inputElement.parentNode.parentNode;
+ while (listitem) {
+ if (listitem.localName === "richlistitem") {
+ ++row;
+ }
+ listitem = listitem.previousSibling;
+ }
+ }
+ return row;
+}
+
+// remove row
+
+function awRemoveRow(row)
+{
+ var listbox = document.getElementById("addressingWidget");
+
+ awRemoveNodeAndChildren(listbox, awGetListItem(row));
+ awFitDummyRows();
+
+ top.MAX_RECIPIENTS--;
+}
+
+function awRemoveNodeAndChildren(parent, nodeToRemove)
+{
+ nodeToRemove.parentNode.removeChild(nodeToRemove);
+}
+
+function awSetFocus(row, inputElement)
+{
+ top.awRow = row;
+ top.awInputElement = inputElement;
+ setTimeout(function() { _awSetFocus() }, 0);
+}
+
+function _awSetFocus()
+{
+ var listbox = document.getElementById("addressingWidget");
+ var theNewRow = awGetListItem(top.awRow);
+
+ //Warning: firstVisibleRow is zero base but top.awRow is one base!
+ var firstVisibleRow = listbox.getIndexOfFirstVisibleRow();
+ var numOfVisibleRows = listbox.getNumberOfVisibleRows();
+
+ //Do we need to scroll in order to see the selected row?
+ if (top.awRow <= firstVisibleRow) {
+ listbox.scrollToIndex(top.awRow - 1);
+ } else if (top.awRow - 1 >= (firstVisibleRow + numOfVisibleRows)) {
+ listbox.scrollToIndex(top.awRow - numOfVisibleRows);
+ }
+
+ top.awInputElement.focus();
+}
+
+function awTabFromRecipient(element, event)
+{
+ // If we are the last element in the listbox, we don't want to create a new row.
+ if (element == awGetInputElement(top.MAX_RECIPIENTS)) {
+ top.doNotCreateANewRow = true;
+ }
+
+ var row = awGetRowByInputElement(element);
+ if (!event.shiftKey && row < top.MAX_RECIPIENTS) {
+ var listBoxRow = row - 1; // listbox row indices are 0-based, ours are 1-based.
+ var listBox = document.getElementById("addressingWidget");
+ listBox.listBoxObject.ensureIndexIsVisible(listBoxRow + 1);
+ }
+}
+
+function awTabFromMenulist(element, event)
+{
+ var row = awGetRowByInputElement(element);
+ if (event.shiftKey && row > 1) {
+ var listBoxRow = row - 1; // listbox row indices are 0-based, ours are 1-based.
+ var listBox = document.getElementById("addressingWidget");
+ listBox.listBoxObject.ensureIndexIsVisible(listBoxRow - 1);
+ }
+}
+
+function awGetNumberOfRecipients()
+{
+ return top.MAX_RECIPIENTS;
+}
+
+function DragOverAddressingWidget(event)
+{
+ var validFlavor = false;
+ var dragSession = dragSession = gDragService.getCurrentSession();
+
+ if (dragSession.isDataFlavorSupported("text/x-moz-address")) {
+ validFlavor = true;
+ }
+ if (validFlavor) {
+ dragSession.canDrop = true;
+ }
+}
+
+function DropOnAddressingWidget(event)
+{
+ var dragSession = gDragService.getCurrentSession();
+
+ var trans = Cc["@mozilla.org/widget/transferable;1"].
+ createInstance(Ci.nsITransferable);
+ trans.init(getLoadContext());
+ trans.addDataFlavor("text/x-moz-address");
+
+ for (var i = 0; i < dragSession.numDropItems; ++i) {
+ dragSession.getData(trans, i);
+ var dataObj = new Object();
+ var bestFlavor = new Object();
+ var len = new Object();
+ trans.getAnyTransferData(bestFlavor, dataObj, len);
+ if (dataObj) {
+ dataObj = dataObj.value.QueryInterface(Ci.nsISupportsString);
+ }
+ if (!dataObj) {
+ continue;
+ }
+ // pull the address out of the data object
+ var address = dataObj.data.substring(0, len.value);
+ if (!address) {
+ continue;
+ }
+ DropRecipient(event.target, address);
+ }
+}
+
+function DropRecipient(target, recipient)
+{
+ // break down and add each address
+ return parseAndAddAddresses(recipient, awGetInputElement(top.MAX_RECIPIENTS).selectedItem.getAttribute("value"));
+}
+
+function _awSetAutoComplete(selectElem, inputElem)
+{
+ let params = JSON.parse(inputElem.getAttribute("autocompletesearchparam"));
+ params.type = selectElem.value;
+ inputElem.setAttribute("autocompletesearchparam", JSON.stringify(params));
+}
+
+function awSetAutoComplete(rowNumber)
+{
+ var inputElem = awGetInputElement(rowNumber);
+ var selectElem = awGetPopupElement(rowNumber);
+ _awSetAutoComplete(selectElem, inputElem)
+}
+
+function awRecipientTextCommandPre31(userAction, element)
+{
+ if (userAction === "typing" || userAction === "scrolling") {
+ awReturnHit(element);
+ }
+}
+
+function awRecipientKeyPress(event, element)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_UP:
+ awArrowHit(element, -1);
+ break;
+ case KeyEvent.DOM_VK_DOWN:
+ awArrowHit(element, 1);
+ break;
+ case KeyEvent.DOM_VK_RETURN:
+ case KeyEvent.DOM_VK_TAB:
+ // if the user text contains a comma or a line return, ignore
+ // str.contains is new to ECMAScript 6
+ // if (element.value.contains(","))
+ if (element.value.search(",") !== -1) {
+ var addresses = element.value;
+ element.value = ""; // clear out the current line so we don't try to autocomplete it..
+ parseAndAddAddresses(addresses, awGetPopupElement(awGetRowByInputElement(element)).selectedItem.getAttribute("value"));
+ } else {
+ if (event.keyCode == KeyEvent.DOM_VK_TAB) {
+ awTabFromRecipient(element, event);
+ }
+ }
+
+ break;
+ }
+}
+
+function awArrowHit(inputElement, direction)
+{
+ var row = awGetRowByInputElement(inputElement) + direction;
+ if (row) {
+ var nextInput = awGetInputElement(row);
+
+ if (nextInput) {
+ awSetFocus(row, nextInput);
+ } else if (inputElement.value) {
+ awAppendNewRow(true);
+ }
+ }
+}
+
+function awRecipientKeyDown(event, element)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_DELETE:
+ case KeyEvent.DOM_VK_BACK_SPACE:
+ if (!element.value) {
+ awDeleteHit(element);
+ }
+ // We need to stop the event else the listbox will receive it and the
+ // function awKeyDown will be executed!
+ event.stopPropagation();
+ break;
+ }
+}
+
+function awKeyDown(event, listboxElement)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_DELETE:
+ case KeyEvent.DOM_VK_BACK_SPACE:
+ /* Warning, the listboxElement.selectedItems will change everytime we delete a row */
+ var selItems = listboxElement.selectedItems;
+ var length = listboxElement.selectedItems.length;
+ for (var i = 1; i <= length; i++) {
+ var inputs = listboxElement.selectedItems[0].getElementsByTagName(awInputElementName());
+ if (inputs && inputs.length === 1) {
+ awDeleteHit(inputs[0]);
+ }
+ }
+ break;
+ }
+}
+
+function awMenulistKeyPress(event, element)
+{
+ switch(event.keyCode) {
+ case KeyEvent.DOM_VK_TAB:
+ awTabFromMenulist(element, event);
+ break;
+ }
+}
+
+/* ::::::::::: addressing widget dummy rows ::::::::::::::::: */
+
+var gAWContentHeight = 0;
+var gAWRowHeight = 0;
+
+function awFitDummyRows()
+{
+ awCalcContentHeight();
+ awCreateOrRemoveDummyRows();
+}
+
+function awCreateOrRemoveDummyRows()
+{
+ let listbox = document.getElementById("addressingWidget");
+ let listboxHeight = listbox.boxObject.height;
+
+ // remove rows to remove scrollbar
+ let kids = listbox.querySelectorAll("[_isDummyRow]");
+ for (let i = kids.length-1; gAWContentHeight > listboxHeight && i >= 0; --i) {
+ gAWContentHeight -= gAWRowHeight;
+ listbox.removeChild(kids[i]);
+ }
+
+ // add rows to fill space
+ if (gAWRowHeight) {
+ while (gAWContentHeight + gAWRowHeight < listboxHeight) {
+ awCreateDummyItem(listbox);
+ gAWContentHeight += gAWRowHeight;
+ }
+ }
+}
+
+function awCalcContentHeight()
+{
+ var listbox = document.getElementById("addressingWidget");
+ var items = listbox.getElementsByTagName("richlistitem");
+
+ gAWContentHeight = 0;
+ if (items.length > 0) {
+ // all rows are forced to a uniform height in xul listboxes, so
+ // find the first listitem with a boxObject and use it as precedent
+ var i = 0;
+ do {
+ gAWRowHeight = items[i].boxObject.height;
+ ++i;
+ } while (i < items.length && !gAWRowHeight);
+ gAWContentHeight = gAWRowHeight*items.length;
+ }
+}
+
+function awCreateDummyItem(aParent)
+{
+ var listbox = document.getElementById("addressingWidget");
+ var item = listbox.getElementsByTagName("richlistitem")[0];
+
+ var titem = document.createElement("richlistitem");
+ titem.setAttribute("_isDummyRow", "true");
+ titem.setAttribute("class", "dummy-row");
+ titem.style.height = item.boxObject.height + "px";
+
+ for (let i = 0; i < awGetNumberOfCols(); i++) {
+ let cell = awCreateDummyCell(titem);
+ if (item.children[i].hasAttribute("style")) {
+ cell.setAttribute("style", item.children[i].getAttribute("style"));
+ }
+ if (item.children[i].hasAttribute("flex")) {
+ cell.setAttribute("flex", item.children[i].getAttribute("flex"));
+ }
+ }
+
+ if (aParent) {
+ aParent.appendChild(titem);
+ }
+ return titem;
+}
+
+function awCreateDummyCell(aParent)
+{
+ var cell = document.createElement("hbox");
+ cell.setAttribute("class", "addressingWidgetCell dummy-row-cell");
+ if (aParent) {
+ aParent.appendChild(cell);
+ }
+ return cell;
+}
+
+function awGetNextDummyRow()
+{
+ // gets the next row from the top down
+ return document.querySelector("#addressingWidget > [_isDummyRow]");
+}
+
+function awSizerListen()
+{
+ // when splitter is clicked, fill in necessary dummy rows each time the mouse is moved
+ awCalcContentHeight(); // precalculate
+ document.addEventListener("mousemove", awSizerMouseMove, true);
+ document.addEventListener("mouseup", awSizerMouseUp, false);
+}
+
+function awSizerMouseMove()
+{
+ awCreateOrRemoveDummyRows();
+}
+
+function awSizerMouseUp()
+{
+ document.removeEventListener("mousemove", awSizerMouseMove, true);
+ document.removeEventListener("mouseup", awSizerMouseUp, false);
+}
+
+function awDocumentKeyPress(event)
+{
+ try {
+ var id = event.target.id;
+ if (id.startsWith("addressCol1")) {
+ awMenulistKeyPress(event, event.target);
+ }
+ } catch (e) { }
+}
+
+// Given an arbitrary block of text like a comma delimited list of names or a names separated by spaces,
+// we will try to autocomplete each of the names and then take the FIRST match for each name, adding it the
+// addressing widget on the compose window.
+
+var gAutomatedAutoCompleteListener = null;
+
+function parseAndAddAddresses(addressText, recipientType)
+{
+ // strip any leading >> characters inserted by the autocomplete widget
+ var strippedAddresses = addressText.replace(/.* >> /, "");
+
+ var addresses = {};
+ var names = {};
+ var fullNames = {};
+ let numAddresses = MailServices.headerParser.parseHeadersWithArray(strippedAddresses, addresses, names, fullNames);
+
+ if (numAddresses > 0) {
+ // we need to set up our own autocomplete session and search for results
+
+ setupAutocomplete(); // be safe, make sure we are setup
+ if (!gAutomatedAutoCompleteListener) {
+ gAutomatedAutoCompleteListener = new AutomatedAutoCompleteHandler();
+ }
+
+ gAutomatedAutoCompleteListener.init(fullNames.value, numAddresses, recipientType);
+ }
+}
+
+function AutomatedAutoCompleteHandler()
+{
+}
+
+// state driven self contained object which will autocomplete a block of addresses without any UI.
+// force picks the first match and adds it to the addressing widget, then goes on to the next
+// name to complete.
+
+AutomatedAutoCompleteHandler.prototype =
+{
+ param: this,
+ sessionName: null,
+ namesToComplete: {},
+ numNamesToComplete: 0,
+ indexIntoNames: 0,
+
+ numSessionsToSearch: 0,
+ numSessionsSearched: 0,
+ recipientType: null,
+ searchResults: null,
+
+ init: function(namesToComplete, numNamesToComplete, recipientType)
+ {
+ this.indexIntoNames = 0;
+ this.numNamesToComplete = numNamesToComplete;
+ this.namesToComplete = namesToComplete;
+
+ this.recipientType = recipientType;
+
+ // set up the auto complete sessions to use
+ setupAutocomplete();
+ this.autoCompleteNextAddress();
+ },
+
+ autoCompleteNextAddress: function()
+ {
+ this.numSessionsToSearch = 0;
+ this.numSessionsSearched = 0;
+ this.searchResults = new Array;
+
+ if (this.indexIntoNames < this.numNamesToComplete && this.namesToComplete[this.indexIntoNames]) {
+ /* XXX This is used to work, until switching to the new toolkit broke it
+ We should fix it see bug 456550.
+ if (!this.namesToComplete[this.indexIntoNames].contains("@")) {
+ // don't autocomplete if address has an @ sign in it
+ // make sure total session count is updated before we kick off ANY actual searches
+ if (gAutocompleteSession) {
+ this.numSessionsToSearch++;
+ }
+
+ if (gLDAPSession && gCurrentAutocompleteDirectory) {
+ this.numSessionsToSearch++;
+ }
+
+ if (gAutocompleteSession) {
+ gAutocompleteSession.onAutoComplete(this.namesToComplete[this.indexIntoNames], null, this);
+ // AB searches are actually synchronous. So by the time we get here we have already looked up results.
+
+ // if we WERE going to also do an LDAP lookup, then check to see if we have a valid match in the AB, if we do
+ // don't bother with the LDAP search too just return
+
+ if (gLDAPSession && gCurrentAutocompleteDirectory && this.searchResults[0] && this.searchResults[0].defaultItemIndex !== -1) {
+ this.processAllResults();
+ return;
+ }
+ }
+
+ if (gLDAPSession && gCurrentAutocompleteDirectory) {
+ gLDAPSession.onStartLookup(this.namesToComplete[this.indexIntoNames], null, this);
+ }
+ }
+ */
+
+ if (!this.numSessionsToSearch) {
+ this.processAllResults(); // ldap and ab are turned off, so leave text alone
+ }
+ }
+ },
+
+ onStatus: function(aStatus)
+ {
+ return;
+ },
+
+ onAutoComplete: function(aResults, aStatus)
+ {
+ // store the results until all sessions are done and have reported in
+ if (aResults) {
+ this.searchResults[this.numSessionsSearched] = aResults;
+ }
+
+ this.numSessionsSearched++; // bump our counter
+
+ if (this.numSessionsToSearch <= this.numSessionsSearched) {
+ setTimeout(function() { gAutomatedAutoCompleteListener.processAllResults() } , 0); // we are all done
+ }
+ },
+
+ processAllResults: function()
+ {
+ // Take the first result and add it to the compose window
+ var addressToAdd;
+
+ // loop through the results looking for the non default case (default case is the address book with only one match, the default domain)
+ var sessionIndex;
+
+ var searchResultsForSession;
+
+ for (sessionIndex in this.searchResults) {
+ searchResultsForSession = this.searchResults[sessionIndex];
+ if (searchResultsForSession && searchResultsForSession.defaultItemIndex > -1) {
+ addressToAdd = searchResultsForSession.items.QueryElementAt(searchResultsForSession.defaultItemIndex, Ci.nsIAutoCompleteItem).value;
+ break;
+ }
+ }
+
+ // still no match? loop through looking for the -1 default index
+ if (!addressToAdd) {
+ for (sessionIndex in this.searchResults) {
+ searchResultsForSession = this.searchResults[sessionIndex];
+ if (searchResultsForSession && searchResultsForSession.defaultItemIndex === -1) {
+ addressToAdd = searchResultsForSession.items.QueryElementAt(0, Ci.nsIAutoCompleteItem).value;
+ break;
+ }
+ }
+ }
+
+ // no matches anywhere...just use what we were given
+ if (!addressToAdd) {
+ addressToAdd = this.namesToComplete[this.indexIntoNames];
+ }
+
+ // that will automatically set the focus on a new available row, and make sure it is visible
+ awAddRecipient(this.recipientType ? this.recipientType : "addr_to", addressToAdd);
+
+ this.indexIntoNames++;
+ this.autoCompleteNextAddress();
+ },
+
+ QueryInterface: function(iid)
+ {
+ if (iid.equals(Ci.nsIAutoCompleteListener) ||
+ iid.equals(Ci.nsISupports)) {
+ return this;
+ }
+ throw Components.results.NS_NOINTERFACE;
+ }
+}
+
+// Returns the load context for the current window
+function getLoadContext() {
+ return window.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsILoadContext);
+}
diff --git a/chrome/content/mailredirect-compose-seamonkey.xul b/chrome/content/mailredirect-compose-seamonkey.xul
new file mode 100644
index 0000000..ffce231
--- /dev/null
+++ b/chrome/content/mailredirect-compose-seamonkey.xul
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Style sheets -->
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="chrome://communicator/skin/communicator.css" type="text/css"?>
+
+<?xml-stylesheet href="chrome://messenger/skin/addressingWidget.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/messengercompose/messengercompose.css" type="text/css"?>
+
+<?xml-stylesheet href="chrome://messenger/skin/threadPane.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/threadPaneExtras.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/threadPaneLabels.css" type="text/css"?>
+
+<?xml-stylesheet href="chrome://messenger/skin/mailWindow1.css" type="text/css"?>
+
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect-compose.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect-subjectCol.css" type="text/css"?>
+
+<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
+
+<!DOCTYPE window [
+ <!ENTITY % mailredirectDTD SYSTEM "chrome://mailredirect/locale/mailredirect-compose.dtd" >
+ %mailredirectDTD;
+ <!ENTITY % utilityDTD SYSTEM "chrome://communicator/locale/utilityOverlay.dtd">
+ %utilityDTD;
+ <!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
+ %customizeToolbarDTD;
+ <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
+ %brandDTD;
+]>
+
+<window id="msgMailRedirectWindow"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:nc="http://home.netscape.com/NC-rdf#"
+ title="&msgMailRedirectWindow.title;"
+ onload="BounceLoad();"
+ onunload="BounceUnload();"
+ onclose="return DoCommandClose()"
+ toggletoolbar="true"
+ lightweightthemes="true"
+ lightweightthemesfooter="status-bar"
+ windowtype="mail:mailredirectWindow"
+ macanimationtype="document"
+ drawtitle="true"
+ width="600" height="350" screenX="100" screenY="100"
+ persist="screenX screenY width height sizemode">
+
+ <stringbundleset id="stringbundleset">
+ <stringbundle id="bundle_composeMsgs" src="chrome://messenger/locale/messengercompose/composeMsgs.properties"/>
+ <stringbundle id="bundle_mailredirect" src="chrome://mailredirect/locale/mailredirect-compose.properties"/>
+ </stringbundleset>
+
+ <!-- <script type="application/javascript" src="chrome://global/content/strres.js"/> -->
+ <script type="application/javascript" src="chrome://messenger/content/commandglue.js"/>
+
+ <!-- <script type="application/javascript" src="chrome://messenger/content/dateFormat.js"/> -->
+ <script type="application/javascript" src="chrome://messenger/content/accountUtils.js"/>
+ <script type="application/javascript" src="chrome://messenger/content/widgetglue.js"/>
+ <!-- <script type="application/javascript" src="chrome://messenger/content/mailCore.js"/> -->
+
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-prefs.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-debug.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-compose.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/aw.js"/>
+
+ <!-- drag and drop -->
+ <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>
+ <script type="application/javascript" src="chrome://global/content/nsTransferable.js"/>
+
+ <!-- move needed functions into a single js file -->
+ <!-- <script type="application/javascript" src="chrome://global/content/charsetOverlay.js"/> -->
+ <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
+ <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
+ <script type="application/javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>
+ <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>
+
+ <commandset>
+ <command id="cmd_mailredirect_now" oncommand="goDoCommand('cmd_mailredirect_now')"/>
+ <command id="cmd_mailredirect_withcheck" oncommand="goDoCommand('cmd_mailredirect_withcheck')"/>
+ <command id="cmd_mailredirect_close" oncommand="goDoCommand('cmd_mailredirect_close')"/>
+ <command id="cmd_mailredirect_delete" oncommand="goDoCommand('cmd_mailredirect_delete')"/>
+ <command id="cmd_CustomizeMailredirectToolbar" oncommand="SuiteCustomizeToolbar(this);"/>
+ </commandset>
+
+ <broadcasterset id="mainBroadcasterSet">
+ <broadcaster id="cmd_CustomizeMailredirectToolbar"/>
+ <broadcaster id="viewAddressPicker" autoCheck="false" type="checkbox" oncommand="toggleAddressPicker();"/>
+ </broadcasterset>
+
+ <keyset id="mailKeys">
+ <key id="key_escape" keycode="VK_ESCAPE" command="cmd_mailredirect_close"/>
+ <key id="my_key_delete" keycode="VK_DELETE" command="cmd_mailredirect_delete"/>
+
+ <!-- File Menu -->
+ <key id="key_bounce" keycode="VK_RETURN" modifiers="accel" observes="cmd_mailredirect_withcheck"/>
+ <key id="key_close" key="&closeCmd.key;" modifiers="&closeCmd.modifiers;" command="cmd_mailredirect_close"/>
+
+ <!-- View Menu -->
+ <key id="key_addressSidebar" keycode="VK_F9" oncommand="toggleAddressPicker();"/>
+
+ <!-- Tools Menu -->
+ <key id="key_mail" key="&messengerCmd.key;" modifiers="&messengerCmd.modifiers;" oncommand="toMessengerWindow();"/>
+ <key id="key_addressbook" key="&addressBookCmd.key;" modifiers="&addressBookCmd.modifiers;" oncommand="toAddressBook();"/>
+
+ <!-- Tab/F6 Keys -->
+ <key id="key_tab" keycode="VK_TAB" modifiers="control" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_shift_tab" keycode="VK_TAB" modifiers="control,shift" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_f6" keycode="VK_F6" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_shift_f6" keycode="VK_F6" modifiers="shift" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_ctrl_f6" keycode="VK_F6" modifiers="control" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_ctrl_shift_f6" keycode="VK_F6" modifiers="control,shift" oncommand="SwitchElementFocus(event);"/>
+ </keyset>
+
+ <popupset id="msgMailredirectPopupSet">
+ <menupopup id="toolbar-context-menu"/>
+ <panel id="customizeToolbarSheetPopup"/>
+ </popupset>
+
+ <toolbox id="bounce-toolbox"
+ class="toolbox-top"
+ mode="full"
+ defaultmode="full">
+
+ <!-- Menu -->
+ <toolbar id="mailredirect-toolbar-menubar"
+ type="menubar"
+ class="chromeclass-menubar"
+ persist="collapsed"
+ customizable="true"
+ defaultset="menubar-items"
+ mode="icons"
+ iconsize="small"
+ defaultmode="icons"
+ defaulticonsize="small"
+ context="toolbar-context-menu">
+
+ <toolbaritem id="menubar-items"
+ class="menubar-items"
+ align="center">
+ <menubar id="mail-menubar">
+ <menu id="menu_File"
+ label="&fileMenu.label;"
+ accesskey="&fileMenu.accesskey;">
+ <menupopup id="menu_FilePopup">
+ <menuitem id="menu-item-bounce-now"
+ label="&forwardBounce.label;"
+ accesskey="&forwardBounce.accesskey;"
+ key="key_bounce"
+ observes="cmd_mailredirect_now"/>
+ <menuseparator id="menu_FileCloseSeparator"/>
+ <menuitem id="menu_close"
+ label="&closeCmd.label;"
+ accesskey="&closeCmd.accesskey;"
+ key="key_close"
+ command="cmd_mailredirect_close"/>
+ </menupopup>
+ </menu>
+
+ <menu id="menu_View" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
+ <menupopup id="menu_View_Popup">
+ <menu id="menu_ToolbarsNew"
+ label="&viewToolbarsMenuNew.label;"
+ accesskey="&viewToolbarsMenuNew.accesskey;">
+ <menupopup id="view_toolbars_popup"
+ onpopupshowing="onViewToolbarsPopupShowing(event);"
+ oncommand="onViewToolbarCommand(event);">
+ <menuitem id="menu_showTaskbar"
+ type="checkbox"
+ label="&showStatusbarCmd.label;"
+ accesskey="&showStatusbarCmd.accesskey;"
+ oncommand="goToggleToolbar('status-bar', 'menu_showTaskbar')"
+ checked="true"/>
+ </menupopup>
+ </menu>
+ <menuitem id="menu_AddressSidebar"
+ label="&addressSidebar.label;" accesskey="&addressSidebar.accesskey;"
+ key="key_addressSidebar" observes="viewAddressPicker"/>
+ </menupopup>
+ </menu>
+
+ <menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;">
+ <menupopup id="taskPopup">
+ <!-- Moving the first two items to the Window menu on the Mac -->
+ <menuitem accesskey="&messengerCmd.accesskey;" label="&messengerCmd.label;" key="key_mail"
+ oncommand="toMessengerWindow();" id="tasksMenuMail" class="menuitem-iconic icon-mail16 menu-iconic"/>
+ <menuitem label="&addressBookCmd.label;" accesskey="&addressBookCmd.accesskey;" key="key_addressbook"
+ oncommand="toAddressBook();" id="tasksMenuAddressBook"
+ class="menuitem-iconic icon-addressbook16 menu-iconic"/>
+ </menupopup>
+ </menu>
+ </menubar>
+ </toolbaritem>
+ </toolbar>
+
+ <toolbarpalette id="MsgMailredirectToolbarPalette">
+ <toolbarbutton class="toolbarbutton-1"
+ id="button-send"
+ observes="cmd_mailredirect_now"
+ label="&bounceButton.label;"
+ tooltiptext="&bounceButton.tooltip;"/>
+ <toolbarbutton class="toolbarbutton-1"
+ id="button-address"
+ label="&addressButton.label;"
+ tooltiptext="&addressButton.tooltip;"
+ oncommand="toAddressBook();"/>
+ <toolbarbutton class="toolbarbutton-1"
+ id="button-contacts"
+ label="&addressSidebarButton.label;"
+ tooltiptext="&addressSidebarButton.tooltip;"
+ observes="viewAddressPicker"/>
+ <toolbaritem id="throbber-box"
+ class="toolbaritem-noline"
+ removable="true"
+ title="&throbberItem.title;"
+ align="center"
+ pack="center"
+ mousethrough="always">
+ <button id="navigator-throbber"
+ oncommand="goClickThrobber('messenger.throbber.url', event)"
+ onclick="checkForMiddleClick(this, event);"
+ tooltiptext="&throbber.tooltip;"/>
+ </toolbaritem>
+ </toolbarpalette>
+
+ <toolbar id="bounceToolbar"
+ class="chromeclass-toolbar"
+ persist="collapsed"
+ toolbarname="&showBounceToolbarCmd.label;"
+ accesskey="&showBounceToolbarCmd.accesskey;"
+ customizable="true"
+ defaultset="button-send,separator,button-contacts,spring,throbber-box"
+ defaultmode="full"
+ defaulticonsize="large"
+ context="toolbar-context-menu">
+ </toolbar>
+
+ <toolbarset id="customToolbars" context="toolbar-context-menu"/>
+ </toolbox>
+
+ <hbox flex="1">
+ <vbox id="sidebar-box" persist="sidebarVisible width" hidden="true">
+ <sidebarheader id="sidebarHeader" align="center">
+ <label id="sidebar-title" value="&addressesSidebarTitle.label;"/>
+ <spacer flex="1"/>
+ <toolbarbutton id="sidebar-close-button" class="ab-closebutton" oncommand="toggleAddressPicker();"/>
+ </sidebarheader>
+ <browser id="sidebar" flex="1" src="" disablehistory="true"
+ style="min-width: 150px; width: 200px; max-width: 400px;"/>
+ </vbox>
+
+ <splitter id="sidebar-splitter" hidden="true"/>
+
+ <vbox flex="1">
+ <toolbox id="headers-box" class="toolbox-top" mode="icons" flex="1">
+ <toolbar id="MsgHeadersToolbar" persist="collapsed" flex="0"
+ customizable="true" nowindowdrag="true"
+ ondragover="nsDragAndDrop.dragOver(event, mailredirectDragObserver);"
+ ondragdrop="nsDragAndDrop.drop(event, mailredirectDragObserver);"
+ ondragexit="nsDragAndDrop.dragExit(event, mailredirectDragObserver);">
+ <vbox flex="1" id="addresses-box">
+ <hbox id="top-gradient-box">
+ <hbox align="center" pack="end" style="&headersSpace.style;">
+ <label value="&resendFromAddr.label;" accesskey="&resendFromAddr.accesskey;" control="msgIdentity"/>
+ </hbox>
+ <menulist id="msgIdentity" type="description" flex="1"
+ oncommand="LoadIdentity(false);" disableonsend="true">
+ <menupopup id="msgIdentityPopup"/>
+ </menulist>
+ </hbox>
+ <richlistbox id="addressingWidget" flex="1" seltype="multiple"
+ onkeydown="awKeyDown(event, this)"
+ onclick="awClickEmptySpace(event.originalTarget, true)"
+ disableonsend="true">
+ <treecols hidden="true">
+ <treecol id="typecol-addressingWidget" style="&headersSpace.style;"/>
+ <treecol id="textcol-addressingWidget" flex="1"/>
+ </treecols>
+ <richlistitem class="addressingWidgetItem" allowevents="true">
+ <hbox class="addressingWidgetCell" align="center" style="&headersSpace.style;">
+ <menulist id="addressCol1#1" disableonsend="true"
+ class="aw-menulist" flex="1"
+ oncommand="onAddressColCommand(this.id);">
+ <menupopup>
+ <menuitem value="addr_to" label="&resendToAddr.label;"/>
+ <menuitem value="addr_cc" label="&resendCcAddr.label;"/>
+ <menuitem value="addr_bcc" label="&resendBccAddr.label;"/>
+ </menupopup>
+ </menulist>
+ <image class="deleteAddress close-icon"
+ onclick="awDeleteHit(this.parentNode.nextSibling.querySelector('textbox.textbox-addressingWidget'));"/>
+ </hbox>
+ <hbox class="addressingWidgetCell" flex="1">
+ <textbox id="addressCol2#1" class="plain textbox-addressingWidget uri-element"
+ aria-labelledby="addressCol1#1"
+ type="autocomplete" flex="1"
+ autocompletesearch="mydomain addrbook ldap"
+ autocompletesearchparam="{}"
+ timeout="300"
+ maxrows="4"
+ completedefaultindex="true" forcecomplete="true"
+ completeselectedindex="true"
+ minresultsforpopup="2" ignoreblurwhilesearching="true"
+ ontextentered="awRecipientTextCommand(eventParam, this)"
+ onerrorcommand="awRecipientErrorCommand(eventParam, this)"
+ oninput="setupAutocomplete();" disableonsend="true"
+ onkeypress="awRecipientKeyPress(event, this)"
+ onkeydown="awRecipientKeyDown(event, this)">
+ <image class="person-icon" onclick="this.parentNode.select();"/>
+ </textbox>
+ </hbox>
+ </richlistitem>
+ </richlistbox>
+ </vbox>
+ </toolbar>
+
+ <splitter id="bounce-toolbar-sizer" onmousedown="awSizerListen()" orient="vertical" collapse="after"/>
+
+ <vbox id="bounceContentArea" flex="1">
+ <separator class="thin"/>
+ <label id="bounceMailsLabel" value="&bounceMailsLabel.label;"/>
+ <separator class="thin"/>
+ <tree id="bounceTree"
+ treelines="true"
+ flex="2"
+ hidecolumnpicker="true"
+ seltype="multiple"
+ class="plain"
+ disableKeyNavigation="true">
+ <treecols>
+ <treecol id="subjectCol" label="&subject.label;" flex="7" ignorecolumnpicker="true" persist="width" />
+ <splitter class="tree-splitter"/>
+ <treecol id="senderCol" label="&sender.label;" flex="7" ignorecolumnpicker="true" persist="width"/>
+ <splitter class="tree-splitter"/>
+ <treecol id="dateCol" label="&date.label;" flex="4" ignorecolumnpicker="true" persist="width"
+ type="progressmeter" />
+ </treecols>
+ <treechildren id="topTreeChildren" flex="1" disableonsend="true"
+ ondragover="nsDragAndDrop.dragOver(event, mailredirectDragObserver);"
+ ondrop="nsDragAndDrop.drop(event, mailredirectDragObserver);"
+ ondragexit="nsDragAndDrop.dragExit(event, mailredirectDragObserver);"
+ />
+ </tree>
+ </vbox>
+ </toolbox>
+ </vbox>
+ </hbox>
+
+ <statusbar id="status-bar-pre65" class="chromeclass-status">
+ <statusbarpanel id="statusText-pre65" flex="1"/>
+ <statusbarpanel id="statusbar-progresspanel-pre65" class="statusbarpanel-progress">
+ <progressmeter id="bounce-progressmeter-pre65" class="progressmeter-statusbar" mode="normal" value="0" collapsed="true"/>
+ </statusbarpanel>
+ </statusbar>
+
+</window>
diff --git a/chrome/content/mailredirect-compose-thunderbird.xul b/chrome/content/mailredirect-compose-thunderbird.xul
new file mode 100644
index 0000000..721040e
--- /dev/null
+++ b/chrome/content/mailredirect-compose-thunderbird.xul
@@ -0,0 +1,384 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Style sheets -->
+<?xml-stylesheet href="chrome://messenger/content/bindings.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/content/menulist.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/messengercompose/messengercompose.css" type="text/css"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="chrome://communicator/skin/communicator.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/compacttheme.css" type="text/css" alternate="yes" title="Light/Dark"?>
+
+<?xml-stylesheet href="chrome://messenger/skin/threadPane.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/threadPaneExtras.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/threadPaneLabels.css" type="text/css"?>
+
+<?xml-stylesheet href="chrome://messenger/skin/mailWindow1.css" type="text/css"?>
+
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect-compose.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect-subjectCol.css" type="text/css"?>
+
+<!DOCTYPE window [
+ <!ENTITY % mailredirectDTD SYSTEM "chrome://mailredirect/locale/mailredirect-compose.dtd" >
+ %mailredirectDTD;
+ <!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
+ %customizeToolbarDTD;
+ <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
+ %brandDTD;
+]>
+
+<window id="msgMailRedirectWindow"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:nc="http://home.netscape.com/NC-rdf#"
+ title="&msgMailRedirectWindow.title;"
+ onload="BounceLoad();"
+ onunload="BounceUnload();"
+ onclose="return DoCommandClose()"
+ toggletoolbar="true"
+ lightweightthemes="true"
+ lightweightthemesfooter="status-bar"
+ windowtype="mail:mailredirectWindow"
+ macanimationtype="document"
+ fullscreenbutton="true"
+ width="600" height="350" screenX="100" screenY="100"
+ persist="screenX screenY width height sizemode">
+
+ <stringbundleset id="stringbundleset">
+ <stringbundle id="bundle_composeMsgs" src="chrome://messenger/locale/messengercompose/composeMsgs.properties"/>
+ <stringbundle id="bundle_mailredirect" src="chrome://mailredirect/locale/mailredirect-compose.properties"/>
+ </stringbundleset>
+
+ <!-- <script type="application/javascript" src="chrome://global/content/strres.js"/> -->
+ <script type="application/javascript" src="chrome://messenger/content/commandglue.js"/>
+
+ <!-- <script type="application/javascript" src="chrome://messenger/content/dateFormat.js"/> -->
+ <script type="application/javascript" src="chrome://messenger/content/accountUtils.js"/>
+ <script type="application/javascript" src="chrome://messenger/content/widgetglue.js"/>
+ <script type="application/javascript" src="chrome://messenger/content/mailCore.js"/>
+ <script type="application/javascript" src="chrome://messenger/content/mail-compacttheme.js"/>
+
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-prefs.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-debug.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-compose.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/aw.js"/>
+
+ <!-- drag and drop -->
+ <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>
+ <script type="application/javascript" src="chrome://global/content/nsTransferable.js"/>
+
+ <!-- move needed functions into a single js file -->
+ <!-- <script type="application/javascript" src="chrome://global/content/charsetOverlay.js"/> -->
+ <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
+ <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
+ <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>
+
+ <commandset>
+ <command id="cmd_mailredirect_now" oncommand="goDoCommand('cmd_mailredirect_now')"/>
+ <command id="cmd_mailredirect_withcheck" oncommand="goDoCommand('cmd_mailredirect_withcheck')"/>
+ <command id="cmd_mailredirect_close" oncommand="goDoCommand('cmd_mailredirect_close')"/>
+ <command id="cmd_mailredirect_delete" oncommand="goDoCommand('cmd_mailredirect_delete')"/>
+ <command id="cmd_CustomizeMailredirectToolbar" oncommand="CustomizeMailToolbar('bounce-toolbox', 'CustomizeMailredirectToolbar')"/>
+ </commandset>
+
+ <broadcasterset id="mailredirectBroadcasters">
+ <broadcaster id="viewAddressPicker" autoCheck="false" type="checkbox" oncommand="toggleAddressPicker();"/>
+ </broadcasterset>
+
+ <keyset id="mailKeys">
+ <key keycode="VK_ESCAPE" command="cmd_mailredirect_close"/>
+ <key keycode="VK_DELETE" command="cmd_mailredirect_delete"/>
+
+ <!-- File Menu -->
+ <key id="key_bounce" keycode="VK_RETURN" modifiers="accel" observes="cmd_mailredirect_withcheck"/>
+ <key id="key_close" key="&closeCmd.key;" modifiers="&closeCmd.modifiers;" command="cmd_mailredirect_close"/>
+
+ <!-- View Menu -->
+ <key id="key_addressSidebar" keycode="VK_F9" oncommand="toggleAddressPicker();"/>
+
+ <!-- Tools Menu -->
+ <key id="key_mail" key="&messengerCmd.key;" modifiers="&messengerCmd.modifiers;" oncommand="toMessengerWindow();"/>
+ <key id="key_addressbook" key="&addressBookCmd.key;" modifiers="&addressBookCmd.modifiers;" oncommand="toAddressBook();"/>
+
+ <!-- Tab/F6 Keys -->
+ <key id="key_tab" keycode="VK_TAB" modifiers="control" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_shift_tab" keycode="VK_TAB" modifiers="control,shift" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_f6" keycode="VK_F6" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_shift_f6" keycode="VK_F6" modifiers="shift" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_ctrl_f6" keycode="VK_F6" modifiers="control" oncommand="SwitchElementFocus(event);"/>
+ <key id="key_ctrl_shift_f6" keycode="VK_F6" modifiers="control,shift" oncommand="SwitchElementFocus(event);"/>
+ </keyset>
+
+ <popupset id="msgMailredirectPopupSet">
+ <menupopup id="toolbar-context-menu"
+ onpopupshowing="onViewToolbarsPopupShowing(event, 'bounce-toolbox');">
+ <menuseparator id="customizeMailredirectToolbarMenuSeparator"/>
+ <menuitem id="CustomizeMailredirectToolbar"
+ command="cmd_CustomizeMailredirectToolbar"
+ label="&customizeToolbar.label;"
+ accesskey="&customizeToolbar.accesskey;"/>
+ </menupopup>
+
+ <panel id="customizeToolbarSheetPopup" noautohide="true">
+ <iframe id="customizeToolbarSheetIFrame"
+ style="&dialog.dimensions;"
+ hidden="true"
+ src=""/>
+ </panel>
+ </popupset>
+
+ <toolbox id="bounce-toolbox"
+ class="toolbox-top"
+ mode="full"
+ defaultmode="full"
+ labelalign="end"
+ defaultlabelalign="end">
+
+ <!-- Menu -->
+ <toolbar id="mailredirect-toolbar-menubar"
+ type="menubar"
+ class="chromeclass-menubar"
+ persist="collapsed"
+ customizable="true"
+ defaultset="menubar-items"
+ mode="icons"
+ iconsize="small"
+ defaultmode="icons"
+ defaulticonsize="small"
+ toolbarname="&menubarCmd.label;"
+ accesskey="&menubarCmd.accesskey;"
+ context="toolbar-context-menu">
+
+ <toolbaritem id="menubar-items"
+ class="menubar-items"
+ align="center">
+ <menubar id="mail-menubar">
+ <menu id="menu_File"
+ label="&fileMenu.label;"
+ accesskey="&fileMenu.accesskey;">
+ <menupopup id="menu_FilePopup">
+ <menuitem label="&forwardBounce.label;"
+ accesskey="&forwardBounce.accesskey;"
+ key="key_bounce"
+ observes="cmd_mailredirect_now"
+ id="menu-item-bounce-now"/>
+ <menuseparator id="menu_FileCloseSeparator"/>
+ <menuitem id="menu_close"
+ label="&closeCmd.label;"
+ key="key_close"
+ accesskey="&closeCmd.accesskey;"
+ command="cmd_mailredirect_close"/>
+ </menupopup>
+ </menu>
+
+ <menu id="menu_View"
+ label="&viewMenu.label;"
+ accesskey="&viewMenu.accesskey;">
+ <menupopup id="menu_View_Popup">
+ <menu id="menu_ToolbarsNew"
+ label="&viewToolbarsMenuNew.label;"
+ accesskey="&viewToolbarsMenuNew.accesskey;"
+ onpopupshowing="onViewToolbarsPopupShowing(event, ['bounce-toolbox']);">
+ <menupopup id="view_toolbars_popup">
+ <menuitem id="menu_showTaskbar"
+ type="checkbox"
+ label="&showStatusbarCmd.label;"
+ accesskey="&showStatusbarCmd.accesskey;"
+ oncommand="goToggleToolbar('status-bar', 'menu_showTaskbar')"
+ checked="true"/>
+ <menuseparator id="viewMenuBeforeCustomizeMailredirectToolbarsSeparator"/>
+ <menuitem id="customizeMailredirectToolbars"
+ label="&customizeToolbar.label;"
+ accesskey="&customizeToolbar.accesskey;"
+ command="cmd_CustomizeMailredirectToolbar"/>
+ </menupopup>
+ </menu>
+ <menuitem id="menu_AddressSidebar"
+ label="&addressSidebar.label;" accesskey="&addressSidebar.accesskey;"
+ key="key_addressSidebar" observes="viewAddressPicker"/>
+ </menupopup>
+ </menu>
+
+ <menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;">
+ <menupopup id="taskPopup">
+ <!-- Moving the first two items to the Window menu on the Mac -->
+ <menuitem accesskey="&messengerCmd.accesskey;" label="&messengerCmd.label;" key="key_mail"
+ oncommand="toMessengerWindow();" id="tasksMenuMail" class="menuitem-iconic icon-mail16 menu-iconic"/>
+ <menuitem label="&addressBookCmd.label;" accesskey="&addressBookCmd.accesskey;" key="key_addressbook"
+ oncommand="toAddressBook();" id="tasksMenuAddressBook"
+ class="menuitem-iconic icon-addressbook16 menu-iconic"/>
+ </menupopup>
+ </menu>
+ </menubar>
+ </toolbaritem>
+ </toolbar>
+
+ <toolbarpalette id="MsgMailredirectToolbarPalette">
+ <toolbarbutton class="toolbarbutton-1"
+ id="button-send"
+ observes="cmd_mailredirect_now"
+ label="&bounceButton.label;"
+ tooltiptext="&bounceButton.tooltip;"/>
+ <toolbarbutton class="toolbarbutton-1"
+ id="button-address"
+ label="&addressButton.label;"
+ tooltiptext="&addressButton.tooltip;"
+ oncommand="toAddressBook();"/>
+ <toolbarbutton class="toolbarbutton-1"
+ id="button-contacts"
+ label="&addressSidebarButton.label;"
+ tooltiptext="&addressSidebarButton.tooltip;"
+ observes="viewAddressPicker"/>
+ <toolbaritem id="throbber-box" title="&throbberItem.title;" align="center" pack="center" mousethrough="always">
+ <image/>
+ </toolbaritem>
+ </toolbarpalette>
+
+ <toolbar id="bounceToolbar"
+ class="chromeclass-toolbar"
+ toolbarname="&showBounceToolbarCmd.label;"
+ accesskey="&showBounceToolbarCmd.accesskey;"
+ fullscreentoolbar="true"
+ mode="full"
+ defaultset="button-send,separator,button-contacts,spring"
+ customizable="true"
+ context="toolbar-context-menu">
+ </toolbar>
+
+ <toolbarset id="customToolbars" context="toolbar-context-menu"/>
+ </toolbox>
+
+ <hbox id="bounceContentBox" flex="1">
+ <vbox id="sidebar-box" persist="sidebarVisible width" hidden="true">
+ <sidebarheader id="sidebarHeader" align="center">
+ <label id="sidebar-title" value="&addressesSidebarTitle.label;"/>
+ <spacer flex="1"/>
+ <toolbarbutton id="sidebarCloseButton"
+ class="ab-closebutton close-icon"
+ oncommand="sidebarCloseButtonOnCommand();"/>
+ </sidebarheader>
+ <browser id="sidebar" flex="1" src="" disablehistory="true"
+ style="min-width: 150px; width: 200px; max-width: 400px;"/>
+ </vbox>
+
+ <splitter id="sidebar-splitter" hidden="true"/>
+
+ <vbox flex="1">
+ <toolbox id="headers-box" class="toolbox-top" mode="icons" flex="1">
+ <toolbar id="MsgHeadersToolbar" persist="collapsed" flex="0"
+ customizable="true" nowindowdrag="true"
+ ondragover="nsDragAndDrop.dragOver(event, mailredirectDragObserver);"
+ ondrop="nsDragAndDrop.drop(event, mailredirectDragObserver);"
+ ondragexit="nsDragAndDrop.dragExit(event, mailredirectDragObserver);">
+ <vbox flex="1" id="addresses-box">
+ <hbox id="top-gradient-box">
+ <hbox id="identityLabel-box" align="center" pack="end" style="&headersSpace.style;">
+ <label id="identityLabel" value="&resendFromAddr.label;"
+ accesskey="&resendFromAddr.accesskey;" control="msgIdentity"/>
+ </hbox>
+ <menulist id="msgIdentity" type="description" flex="1"
+ disableautoselect="true" onkeypress="fromKeyPress(event);"
+ oncommand="LoadIdentity(false);" disableonsend="true">
+ <menupopup id="msgIdentityPopup"/>
+ </menulist>
+ </hbox>
+ <richlistbox id="addressingWidget" flex="1" seltype="multiple"
+ onkeydown="awKeyDown(event, this)"
+ onclick="awClickEmptySpace(event.originalTarget, true)"
+ disableonsend="true">
+ <treecols hidden="true">
+ <treecol id="typecol-addressingWidget" style="&headersSpace.style;"/>
+ <treecol id="textcol-addressingWidget" flex="1"/>
+ </treecols>
+ <richlistitem class="addressingWidgetItem" allowevents="true">
+ <hbox class="addressingWidgetCell" align="center" style="&headersSpace.style;">
+ <menulist id="addressCol1#1" disableonsend="true"
+ class="aw-menulist" flex="1"
+ oncommand="onAddressColCommand(this.id);">
+ <menupopup>
+ <menuitem value="addr_to" label="&resendToAddr.label;"/>
+ <menuitem value="addr_cc" label="&resendCcAddr.label;"/>
+ <menuitem value="addr_bcc" label="&resendBccAddr.label;"/>
+ </menupopup>
+ </menulist>
+ <image class="deleteAddress close-icon"
+ onclick="awDeleteHit(this.parentNode.nextSibling.querySelector('textbox.textbox-addressingWidget'));"/>
+ </hbox>
+ <hbox class="addressingWidgetCell" flex="1">
+ <textbox id="addressCol2#1" class="plain textbox-addressingWidget uri-element"
+ aria-labelledby="addressCol1#1"
+ type="autocomplete" flex="1"
+ autocompletesearch="mydomain addrbook ldap"
+ autocompletesearchparam="{}"
+ timeout="300"
+ maxrows="6"
+ completedefaultindex="true" forcecomplete="true"
+ completeselectedindex="true"
+ minresultsforpopup="2" ignoreblurwhilesearching="true"
+ ontextentered="awRecipientTextCommand(param, this)"
+ onchange="onRecipientsChanged();"
+ oninput="onRecipientsChanged();"
+ onkeypress="awRecipientKeyPress(event, this)"
+ onkeydown="awRecipientKeyDown(event, this)"
+ disableonsend="true">
+ </textbox>
+ </hbox>
+ </richlistitem>
+ </richlistbox>
+ </vbox>
+ </toolbar>
+
+ <splitter id="bounce-toolbar-sizer" onmousedown="awSizerListen()" orient="vertical"/>
+
+ <vbox id="bounceContentArea" flex="1">
+ <separator class="thin"/>
+ <label id="bounceMailsLabel" value="&bounceMailsLabel.label;"/>
+ <separator class="thin"/>
+ <tree id="bounceTree"
+ treelines="true"
+ flex="2"
+ hidecolumnpicker="true"
+ seltype="multiple"
+ class="plain"
+ disableKeyNavigation="true">
+ <treecols>
+ <treecol id="subjectCol" label="&subject.label;" flex="7" ignorecolumnpicker="true" persist="width" />
+ <splitter class="tree-splitter"/>
+ <treecol id="senderCol" label="&sender.label;" flex="7" ignorecolumnpicker="true" persist="width"/>
+ <splitter class="tree-splitter"/>
+ <treecol id="dateCol" label="&date.label;" flex="4" ignorecolumnpicker="true" persist="width"
+ type="progressmeter"/>
+ </treecols>
+ <treechildren id="topTreeChildren" flex="1" disableonsend="true"
+ ondragover="nsDragAndDrop.dragOver(event, mailredirectDragObserver);"
+ ondrop="nsDragAndDrop.drop(event, mailredirectDragObserver);"
+ ondragexit="nsDragAndDrop.dragExit(event, mailredirectDragObserver);"
+ />
+ </tree>
+ </vbox>
+ </toolbox>
+ </vbox>
+ </hbox>
+
+ <panel id="customizeToolbarSheetPopup" noautohide="true">
+ <iframe id="customizeToolbarSheetIFrame"
+ style="&dialog.dimensions;"
+ hidden="true"/>
+ </panel>
+
+ <hbox id="status-bar" class="statusbar chromeclass-status">
+ <statusbarpanel id="statusText" flex="1"/>
+ <hbox id="statusbar-progresspanel"
+ class="statusbarpanel statusbarpanel-progress"
+ collapsed="true">
+ <html:progress id="bounce-progressmeter" class="progressmeter-statusbar" value="0" max="100"/>
+ </hbox>
+ </hbox>
+
+ <statusbar id="status-bar-pre65" class="chromeclass-status" collapsed="true">
+ <statusbarpanel id="statusText-pre65" flex="1"/>
+ <statusbarpanel id="statusbar-progresspanel-pre65" class="statusbarpanel-progress">
+ <progressmeter id="bounce-progressmeter-pre65" class="progressmeter-statusbar" mode="normal" value="0" collapsed="true"/>
+ </statusbarpanel>
+ </statusbar>
+
+</window>
diff --git a/chrome/content/mailredirect-compose.js b/chrome/content/mailredirect-compose.js
new file mode 100644
index 0000000..a4bf670
--- /dev/null
+++ b/chrome/content/mailredirect-compose.js
@@ -0,0 +1,3382 @@
+// based on https://dxr.mozilla.org/comm-central/source/comm/mail/components/compose/content/MsgComposeCommands.js
+
+"use strict";
+
+const THUNDERBIRD_ID = "{3550f703-e582-4d05-9a08-453d09bdfdc6}";
+const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
+
+Components.utils.import("resource:///modules/folderUtils.jsm"); // Gecko 2+ (TB3.3)
+Components.utils.import("resource://gre/modules/Services.jsm"); // Gecko 2+ (TB3.3)
+Components.utils.import("resource:///modules/iteratorUtils.jsm");
+try {
+ // mailServices.js has been renamed MailServices.jsm in TB63
+ Components.utils.import("resource:///modules/MailServices.jsm");
+} catch(ex) {
+ Components.utils.import("resource:///modules/mailServices.js"); // Gecko 5+ (TB5)
+}
+Components.utils.import("resource://gre/modules/PluralForm.jsm");
+Components.utils.import("resource://gre/modules/AddonManager.jsm");
+try {
+ Components.utils.import("resource://gre/modules/AppConstants.jsm"); // Gecko 45+
+ Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm"); // Gecko 60+
+} catch(ex) { };
+
+const Cc = Components.classes, Ci = Components.interfaces;
+
+// Max header length is 32768, but UTF-8 encoded e-mail addresses can be twice
+// as long as normal e-mail addresses
+const MAX_HEADER_LENGTH = 16384;
+
+// from nsDirPrefs.h
+const kPersonalAddressbookUri = "moz-abmdbdirectory://abook.mab";
+const kCollectedAddressbookUri = "moz-abmdbdirectory://history.mab";
+
+const kDateFormatNone = 0; // do not include the date in the format string
+const kDateFormatLong = 1; // provides the long date format for the given locale
+const kDateFormatShort = 2; // provides the short date format for the given locale
+const kDateFormatYearMonth = 3; // formats using only the year and month
+const kDateFormatWeekday = 4; // week day (e.g. Mon, Tue)
+
+const kTimeFormatNone = 0; // don't include the time in the format string
+const kTimeFormatSeconds = 1; // provides the time format with seconds in the given locale
+const kTimeFormatNoSeconds = 2; // provides the time format without seconds in the given locale
+
+const PR_MSEC_PER_SEC = 1000;
+const PR_MSEC_PER_DAY = PR_MSEC_PER_SEC * 60 * 60 * 24;
+
+// Global message window object
+var msgWindow;
+var gMessenger;
+
+// Global variables
+
+var gAppInfoID = null;
+var gAppInfoPlatformVersion = null;
+var gMsgCompose;
+var gWindowLocked;
+var gSendLocked;
+var gAccountManager;
+var gSessionAdded;
+var gCurrentAutocompleteDirectory;
+var gCurrentIdentity;
+var gSetupLdapAutocomplete;
+var gLDAPSession;
+var mailredirectRecipients;
+var aSender;
+
+var gAbResultsTree = null;
+
+// redirected mail states..
+var mstate = {
+ selectedURIs: null,
+ selectedURIsProgress: null,
+ successfulSent: null,
+ statusStrings: null,
+ sendOperationInProgress: null,
+ msgSendObj: null,
+ size: 0
+};
+
+function InitializeGlobalVariables()
+{
+ gMessenger = Cc["@mozilla.org/messenger;1"].
+ createInstance(Ci.nsIMessenger);
+
+ gMsgCompose = null;
+ gWindowLocked = false;
+ gSetupLdapAutocomplete = false;
+ mailredirectRecipients = null;
+ aSender = null;
+ msgWindow = Cc["@mozilla.org/messenger/msgwindow;1"].createInstance(Ci.nsIMsgWindow);
+ MailServices.mailSession.AddMsgWindow(msgWindow);
+}
+
+InitializeGlobalVariables();
+
+function ReleaseGlobalVariables()
+{
+ gMessenger = null;
+ gMsgCompose = null;
+ mailredirectRecipients = null;
+ mstate = null;
+ MailServices.mailSession.RemoveMsgWindow(msgWindow);
+ msgWindow = null;
+}
+
+MailredirectPrefs.init();
+
+var dumper = new MailredirectDebug.Dump();
+
+function RemoveValueFromAttribute(el, attr, val)
+{
+ var orgval = el.getAttribute(attr);
+ val = val.replace(/^\s+|\s+$/g, "");
+ var regExp = new RegExp("(?:^|\\s+)" + val + "(?:\\s+|$)", "g");
+ var newval = orgval.replace(regExp, "");
+ if (newval.match(/^\s*$/)) {
+ el.removeAttribute(attr);
+ } else {
+ el.setAttribute(attr, newval);
+ }
+}
+
+function clearMState()
+{
+ dumper.dump("clearing mstate");
+ mstate.selectedURIsProgress = [];
+ mstate.successfulSent = [];
+ mstate.statusStrings = [];
+ mstate.sendOperationInProgress = [];
+ mstate.msgSendObj = [];
+
+ for (var i = 0; i < mstate.size; ++i) {
+ mstate.selectedURIsProgress[i] = 0;
+ // mstate.successfulSent[i] = true;
+ mstate.successfulSent[i] = false;
+ mstate.statusStrings[i] = "";
+ mstate.sendOperationInProgress[i] = false;
+ mstate.msgSendObj[i] = null;
+ }
+
+ // clear treeitems status in bounceTree
+ var treeChildren = document.getElementById("topTreeChildren");
+ // dumper.dump("treeChildren=" + treeChildren);
+ if (treeChildren) {
+ var el = treeChildren.getElementsByTagName("treerow");
+ // dumper.dump("el=" + el + " length=" + el.length);
+ if (el) {
+ for (var i = 0; i < el.length; ++i) {
+ // dumper.dump("el[" + i + "]=" + el[i]);
+ RemoveValueFromAttribute(el[i], "properties", "notsent");
+ for (var n = 0; n < el[i].childNodes.length; ++n) {
+ RemoveValueFromAttribute(el[i].childNodes[n], "properties", "notsent");
+ }
+ var col = el[i].lastChild;
+ if (col) {
+ col.setAttribute("mode", "normal");
+ col.setAttribute("value", "0");
+ }
+ }
+ }
+ }
+}
+
+function toOpenWindowByType(inType, uri)
+{
+ var topWindow = Cc["@mozilla.org/appshell/window-mediator;1"].
+ getService(Ci.nsIWindowMediator).
+ getMostRecentWindow(inType);
+
+ if (topWindow) {
+ topWindow.focus();
+ } else {
+ window.open(uri, "_blank", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
+ }
+}
+
+function toMessengerWindow()
+{
+ toOpenWindowByType("mail:3pane", "chrome://messenger/content/messenger.xul");
+}
+
+function toAddressBook()
+{
+ toOpenWindowByType("mail:addressbook", "chrome://messenger/content/addressbook/addressbook.xul");
+}
+
+function onViewToolbarCommand(aEvent)
+{
+ var toolbar = aEvent.originalTarget.getAttribute("toolbarid");
+ if (toolbar) {
+ goToggleToolbar(toolbar);
+ }
+}
+
+/**
+ * Disables or restores all toolbar items (menus/buttons) in the window.
+ *
+ * @param aDisable true = disable all items. false = restore items to the state
+ * stored before disabling them.
+ */
+function updateAllItems(aDisable)
+{
+ function getDisabledState(aElement) {
+ if ("disabled" in aElement) {
+ return aElement.disabled;
+ } else {
+ return aElement.getAttribute("disabled");
+ }
+ }
+
+ function setDisabledState(aElement, aValue) {
+ if ("disabled" in aElement) {
+ aElement.disabled = aValue;
+ } else {
+ aElement.setAttribute("disabled", aValue ? "true" : "false");
+ }
+ }
+
+ // This array will contain HTMLCollection objects as members.
+ let commandItemCollections = [];
+ commandItemCollections.push(document.getElementsByTagName("menu"));
+ commandItemCollections.push(document.getElementsByTagName("toolbarbutton"));
+ commandItemCollections.push(document.querySelectorAll("[command]"));
+ commandItemCollections.push(document.querySelectorAll("[oncommand]"));
+ // for..each doesn't work in Gecko>=55, for..of doesn't work in Gecko<13
+ for (let index in commandItemCollections) {
+ let itemCollection = commandItemCollections[index];
+ for (let item = 0; item < itemCollection.length; item++) {
+ let commandItem = itemCollection[item];
+ if (aDisable) {
+ // Any element can appear multiple times in the commandItemCollections
+ // list so only act on it if we didn't already set the "stateBeforeSend"
+ // attribute on previous visit.
+ if (!commandItem.hasAttribute("stateBeforeSend")) {
+ commandItem.setAttribute("stateBeforeSend", getDisabledState(commandItem));
+ setDisabledState(commandItem, true);
+ }
+ } else {
+ // Any element can appear multiple times in the commandItemCollections
+ // list so only act on it if it still has the "stateBeforeSend"
+ // attribute.
+ if (commandItem.hasAttribute("stateBeforeSend")) {
+ setDisabledState(commandItem, commandItem.getAttribute("stateBeforeSend") == "true");
+ commandItem.removeAttribute("stateBeforeSend");
+ }
+ }
+ }
+ }
+}
+
+/**
+ * Update all the commands for sending a message to reflect their current state.
+ */
+function updateSendCommands(aHaveController)
+{
+ updateSendLock();
+ if (aHaveController) {
+ goUpdateCommand("cmd_mailredirect_now");
+ goUpdateCommand("cmd_mailredirect_withcheck");
+ } else {
+ goSetCommandEnabled("cmd_mailredirect_now", MailredirectWindowController.isCommandEnabled("cmd_mailredirect_now"));
+ goSetCommandEnabled("cmd_mailredirect_withcheck", MailredirectWindowController.isCommandEnabled("cmd_mailredirect_withcheck"));
+ }
+}
+
+/**
+ * Keep the Send buttons disabled until any recipient is entered.
+ */
+function updateSendLock()
+{
+ if (gAppInfoID === SEAMONKEY_ID) {
+ gSendLocked = false;
+ return;
+ }
+
+ gSendLocked = true;
+ if (!gMsgCompose) {
+ return;
+ }
+
+ let msgCompFields = gMsgCompose.compFields;
+ Recipients2CompFields(msgCompFields);
+ // Enabled send buttons if anything was entered into the recipient fields.
+ // A more thorough check will be performed when a send button is actually clicked.
+ // hasRecipients is new to Thunderbird 23
+ gSendLocked = (typeof msgCompFields.hasRecipients !== "undefined"
+ ? !msgCompFields.hasRecipients
+ : (msgCompFields.to.match(/^\s*$/) &&
+ msgCompFields.cc.match(/^\s*$/) &&
+ msgCompFields.bcc.match(/^\s*$/)));
+}
+
+/**
+ * Check if the entered addresses are valid and alert the user if they are not.
+ *
+ * @param aMsgCompFields A nsIMsgCompFields object containing the fields to check.
+ */
+function CheckValidEmailAddress(aMsgCompFields)
+{
+ // hasRecipients is new to Thunderbird 23
+ if (typeof aMsgCompFields.hasRecipients !== "undefined"
+ ? !aMsgCompFields.hasRecipients
+ : (aMsgCompFields.to.match(/^\s*$/) &&
+ aMsgCompFields.cc.match(/^\s*$/) &&
+ aMsgCompFields.bcc.match(/^\s*$/))) {
+ var composeMsgsBundle = document.getElementById("bundle_composeMsgs");
+ var errorTitle;
+ var errorMsg;
+ if (gAppInfoID === THUNDERBIRD_ID) {
+ errorTitle = composeMsgsBundle.getString("addressInvalidTitle");
+ } else {
+ errorTitle = composeMsgsBundle.getString("sendMsgTitle");
+ }
+ try {
+ errorMsg = composeMsgsBundle.getString("noRecipients");
+ } catch(ex) {
+ // Entity 12511 was renamed to addressInvalid in TB38
+ errorMsg = composeMsgsBundle.getString("12511");
+ }
+ Services.prompt.alert(window, errorTitle, errorMsg);
+
+ return false;
+ }
+
+ let invalidStr;
+ // Crude check that the to, cc, and bcc fields contain at least one '@'.
+ // We could parse each address, but that might be overkill.
+ function isInvalidAddress(aAddress) {
+ // str.includes is new to ECMAScript 6
+ if (typeof String.prototype.includes !== "function") {
+ // dumper.dump("defineProperty includes");
+ Object.defineProperty(String.prototype, "includes", {
+ enumerable: false,
+ configurable: true,
+ writable: false,
+ value: function() {
+ "use strict";
+ var start = 0;
+ if (typeof arguments[1] === "number") {
+ start = arguments[1];
+ }
+ if (this.length < arguments[0].length + start) {
+ return false;
+ } else {
+ return this.indexOf(arguments[0], start) !== -1;
+ }
+ }
+ });
+ }
+ // str.endsWith is new to ECMAScript 6
+ if (typeof String.prototype.endsWith !== "function") {
+ // dumper.dump("defineProperty endsWith");
+ Object.defineProperty(String.prototype, "endsWith", {
+ enumerable: false,
+ configurable: true,
+ writable: false,
+ value: function(searchString, position) {
+ var subjectString = this.toString();
+ if (position === undefined || position > subjectString.length) {
+ position = subjectString.length;
+ }
+ position -= searchString.length;
+ var lastIndex = subjectString.indexOf(searchString, position);
+ return lastIndex !== -1 && lastIndex === position;
+ }
+ });
+ }
+ return (aAddress.length > 0 &&
+ ((!aAddress.includes("@", 1) && aAddress.toLowerCase() != "postmaster") ||
+ aAddress.endsWith("@")));
+ }
+ if (isInvalidAddress(aMsgCompFields.to)) {
+ invalidStr = aMsgCompFields.to;
+ } else if (isInvalidAddress(aMsgCompFields.cc)) {
+ invalidStr = aMsgCompFields.cc;
+ } else if (isInvalidAddress(aMsgCompFields.bcc)) {
+ invalidStr = aMsgCompFields.bcc;
+ }
+
+ if (invalidStr) {
+ var composeMsgsBundle = document.getElementById("bundle_composeMsgs");
+ var errorTitle;
+ if (gAppInfoID === THUNDERBIRD_ID) {
+ errorTitle = composeMsgsBundle.getString("addressInvalidTitle");
+ } else {
+ errorTitle = composeMsgsBundle.getString("sendMsgTitle");
+ }
+ Services.prompt.alert(window, errorTitle,
+ composeMsgsBundle.getFormattedString("addressInvalid",
+ [invalidStr], 1));
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * Locks/Unlocks the window widgets while a message is being saved/sent.
+ * Locking means to disable all possible items in the window so that
+ * the user can't click/activate anything.
+ *
+ * @param aDisable true = lock the window. false = unlock the window.
+ */
+function ToggleWindowLock(aDisable)
+{
+ gWindowLocked = aDisable;
+ updateAllItems(aDisable);
+ updateEditableFields(aDisable);
+}
+
+var directoryServerObserver = {
+ observe: function(subject, topic, value) {
+ try {
+ setupLdapAutocompleteSession();
+ } catch (ex) {
+ // catch the exception and ignore it, so that if LDAP setup
+ // fails, the entire compose window doesn't get horked
+ }
+ }
+}
+
+function AddDirectoryServerObserver(flag)
+{
+ if (flag) {
+ Services.prefs.addObserver("ldap_2.autoComplete.useDirectory",
+ directoryServerObserver, false);
+ Services.prefs.addObserver("ldap_2.autoComplete.directoryServer",
+ directoryServerObserver, false);
+ } else {
+ var prefstring = "mail.identity." + gCurrentIdentity.key + ".overrideGlobal_Pref";
+ Services.prefs.addObserver(prefstring, directoryServerObserver, false);
+ prefstring = "mail.identity." + gCurrentIdentity.key + ".directoryServer";
+ Services.prefs.addObserver(prefstring, directoryServerObserver, false);
+ }
+}
+
+function RemoveDirectoryServerObserver(prefstring)
+{
+ if (!prefstring) {
+ Services.prefs.removeObserver("ldap_2.autoComplete.useDirectory", directoryServerObserver);
+ Services.prefs.removeObserver("ldap_2.autoComplete.directoryServer", directoryServerObserver);
+ } else {
+ var str = prefstring + ".overrideGlobal_Pref";
+ Services.prefs.removeObserver(str, directoryServerObserver);
+ str = prefstring + ".directoryServer";
+ Services.prefs.removeObserver(str, directoryServerObserver);
+ }
+}
+
+function AddDirectorySettingsObserver()
+{
+ Services.prefs.addObserver(gCurrentAutocompleteDirectory, directoryServerObserver, false);
+}
+
+function RemoveDirectorySettingsObserver(prefstring)
+{
+ Services.prefs.removeObserver(prefstring, directoryServerObserver);
+}
+
+function setupLdapAutocompleteSession()
+{
+ var autocompleteLdap = false;
+ var autocompleteDirectory = null;
+ var prevAutocompleteDirectory = gCurrentAutocompleteDirectory;
+
+ autocompleteLdap = getPref("ldap_2.autoComplete.useDirectory");
+ if (autocompleteLdap) {
+ autocompleteDirectory = getPref("ldap_2.autoComplete.directoryServer");
+ }
+
+ if (gCurrentIdentity.overrideGlobalPref) {
+ autocompleteDirectory = gCurrentIdentity.directoryServer;
+ }
+
+ // use a temporary to do the setup so that we don't overwrite the
+ // global, then have some problem and throw an exception, and leave the
+ // global with a partially setup session. we'll assign the temp
+ // into the global after we're done setting up the session
+ //
+ var LDAPSession;
+ if (gLDAPSession) {
+ LDAPSession = gLDAPSession;
+ } else {
+ LDAPSession = Cc["@mozilla.org/autocompleteSession;1?type=ldap"];
+ if (LDAPSession) {
+ try {
+ LDAPSession = LDAPSession.createInstance(Ci.nsILDAPAutoCompleteSession);
+ } catch (ex) {
+ dumper.dump ("ERROR: Cannot get the LDAP autocomplete session:" + ex);}
+ }
+ }
+
+ if (autocompleteDirectory && !Services.io.offline) {
+ // Add observer on the directory server we are autocompleting against
+ // only if current server is different from previous.
+ // Remove observer if current server is different from previous
+ gCurrentAutocompleteDirectory = autocompleteDirectory;
+ if (prevAutocompleteDirectory) {
+ if (prevAutocompleteDirectory !== gCurrentAutocompleteDirectory) {
+ RemoveDirectorySettingsObserver(prevAutocompleteDirectory);
+ AddDirectorySettingsObserver();
+ }
+ } else {
+ AddDirectorySettingsObserver();
+ }
+
+ // fill in the session params if there is a session
+ //
+ if (LDAPSession) {
+ let url = getPref(autocompleteDirectory + ".uri", true);
+
+ LDAPSession.serverURL = Services.io.
+ newURI(url, null, null).
+ QueryInterface(Ci.nsILDAPURL);
+
+ // get the login to authenticate as, if there is one
+ //
+ try {
+ LDAPSession.login = getPref(autocompleteDirectory + ".auth.dn", true);
+ } catch (ex) {
+ // if we don't have this pref, no big deal
+ }
+
+ try {
+ LDAPSession.saslMechanism = getPref(autocompleteDirectory + ".auth.saslmech", true);
+ } catch (ex) {
+ // don't care if we don't have this pref
+ }
+
+ // set the LDAP protocol version correctly
+ var protocolVersion;
+ try {
+ protocolVersion = getPref(autocompleteDirectory + ".protocolVersion");
+ } catch (ex) {
+ // if we don't have this pref, no big deal
+ }
+ if (protocolVersion === "2") {
+ LDAPSession.version = Ci.nsILDAPConnection.VERSION2;
+ }
+
+ // don't search on non-CJK strings shorter than this
+ //
+ try {
+ LDAPSession.minStringLength = getPref(autocompleteDirectory + ".autoComplete.minStringLength");
+ } catch (ex) {
+ // if this pref isn't there, no big deal. just let
+ // nsLDAPAutoCompleteSession use its default.
+ }
+
+ // don't search on CJK strings shorter than this
+ //
+ try {
+ LDAPSession.cjkMinStringLength = getPref(autocompleteDirectory + ".autoComplete.cjkMinStringLength");
+ } catch (ex) {
+ // if this pref isn't there, no big deal. just let
+ // nsLDAPAutoCompleteSession use its default.
+ }
+
+ // we don't try/catch here, because if this fails, we're outta luck
+ //
+ var ldapFormatter = Cc["@mozilla.org/ldap-autocomplete-formatter;1?type=addrbook"].
+ createInstance(Ci.nsIAbLDAPAutoCompFormatter);
+
+ // override autocomplete name format?
+ //
+ try {
+ ldapFormatter.nameFormat = getPref(autocompleteDirectory + ".autoComplete.nameFormat", true);
+ } catch (ex) {
+ // if this pref isn't there, no big deal. just let
+ // nsAbLDAPAutoCompFormatter use its default.
+ }
+
+ // override autocomplete mail address format?
+ //
+ try {
+ ldapFormatter.addressFormat = getPref(autocompleteDirectory + ".autoComplete.addressFormat", true);
+ } catch (ex) {
+ // if this pref isn't there, no big deal. just let
+ // nsAbLDAPAutoCompFormatter use its default.
+ }
+
+ try {
+ // figure out what goes in the comment column, if anything
+ //
+ // 0 = none
+ // 1 = name of addressbook this card came from
+ // 2 = other per-addressbook format
+ //
+ var showComments = getPref("mail.autoComplete.commentColumn");
+
+ switch (showComments) {
+ case 1:
+ // use the name of this directory
+ //
+ ldapFormatter.commentFormat = getPref(autocompleteDirectory + ".description", true);
+ break;
+
+ case 2:
+ // override ldap-specific autocomplete entry?
+ //
+ try {
+ ldapFormatter.commentFormat = getPref(autocompleteDirectory + ".autoComplete.commentFormat", true);
+ } catch (innerException) {
+ // if nothing has been specified, use the ldap
+ // organization field
+ ldapFormatter.commentFormat = "[o]";
+ }
+ break;
+
+ case 0:
+ default:
+ // do nothing
+ }
+ } catch (ex) {
+ // if something went wrong while setting up comments, try and
+ // proceed anyway
+ }
+
+ // set the session's formatter, which also happens to
+ // force a call to the formatter's getAttributes() method
+ // -- which is why this needs to happen after we've set the
+ // various formats
+ //
+ LDAPSession.formatter = ldapFormatter;
+
+ // override autocomplete entry formatting?
+ //
+ try {
+ LDAPSession.outputFormat = getPref(autocompleteDirectory + ".autoComplete.outputFormat", true);
+ } catch (ex) {
+ // if this pref isn't there, no big deal. just let
+ // nsLDAPAutoCompleteSession use its default.
+ }
+
+ // override default search filter template?
+ //
+ try {
+ LDAPSession.filterTemplate = getPref(autocompleteDirectory + ".autoComplete.filterTemplate", true);
+ } catch (ex) {
+ // if this pref isn't there, no big deal. just let
+ // nsLDAPAutoCompleteSession use its default
+ }
+
+ // override default maxHits (currently 100)
+ //
+ try {
+ // XXXdmose should really use .autocomplete.maxHits,
+ // but there's no UI for that yet
+ //
+ LDAPSession.maxHits = getPref(autocompleteDirectory + ".maxHits");
+ } catch (ex) {
+ // if this pref isn't there, or is out of range, no big deal.
+ // just let nsLDAPAutoCompleteSession use its default.
+ }
+
+ if (!gSessionAdded) {
+ // if we make it here, we know that session initialization has
+ // succeeded; add the session for all recipients, and
+ // remember that we've done so
+ let maxRecipients = awGetMaxRecipients();
+ for (let i = 1; i <= maxRecipients; i++) {
+ let autoCompleteWidget = document.getElementById("addressCol2#" + i);
+ if (autoCompleteWidget) {
+ autoCompleteWidget.addSession(LDAPSession);
+ // ldap searches don't insert a default entry with the default domain appended to it
+ // so reduce the minimum results for a popup to 2 in this case.
+ autoCompleteWidget.minResultsForPopup = 2;
+ }
+ }
+ gSessionAdded = true;
+ }
+ }
+ } else {
+ if (gCurrentAutocompleteDirectory) {
+ // Remove observer on the directory server since we are not doing Ldap
+ // autocompletion.
+ RemoveDirectorySettingsObserver(gCurrentAutocompleteDirectory);
+ gCurrentAutocompleteDirectory = null;
+ }
+ if (gLDAPSession && gSessionAdded) {
+ let maxRecipients = awGetMaxRecipients();
+ for (let i = 1; i <= maxRecipients; i++) {
+ document.getElementById("addressCol2#" + i).
+ removeSession(gLDAPSession);
+ }
+ gSessionAdded = false;
+ }
+ }
+
+ gLDAPSession = LDAPSession;
+ gSetupLdapAutocomplete = true;
+}
+
+function queryIArray(aArray, iid)
+{
+ var result = new Array;
+ if (!aArray) {
+ return result;
+ }
+ if (aArray.queryElementAt) {
+ // nsIArray
+ for (let i = 0; i < aArray.length; i++) {
+ result[i] = aArray.queryElementAt(i, iid);
+ }
+ } else {
+ // nsISupportsArray
+ for (let i = 0; i < aArray.Count(); i++) {
+ result[i] = aArray.QueryElementAt(i, iid);
+ }
+ }
+ return result;
+}
+
+function onAddressColCommand(aAddressWidgetId)
+{
+ awSetAutoComplete(aAddressWidgetId.slice(aAddressWidgetId.lastIndexOf("#") + 1));
+ updateSendCommands(true);
+}
+
+/**
+ * Called if the list of recipients changed in any way.
+ *
+ * @param aAutomatic Set to true if the change of recipients was invoked
+ * programatically and should not be considered a change
+ * of message content.
+ */
+function onRecipientsChanged(aAutomatic)
+{
+ updateSendCommands(true);
+}
+
+function FillIdentityList(menulist)
+{
+ var accounts;
+ try {
+ // Function is new to Thunderbird 19
+ accounts = allAccountsSorted(true);
+ } catch (ex) {
+ accounts = queryIArray(gAccountManager.accounts, Ci.nsIMsgAccount);
+ }
+
+ let accountHadSeparator = false;
+ let firstAccountWithIdentities = true;
+ for (let acc = 0; acc < accounts.length; acc++) {
+ let account = accounts[acc];
+
+ let server = account.incomingServer;
+ if (!server || server.type === "nntp") {
+ continue;
+ }
+
+ let identities = toArray(fixIterator(account.identities,
+ Ci.nsIMsgIdentity));
+
+ if (identities.length === 0) {
+ continue;
+ }
+
+ let needSeparator = (identities.length > 1);
+ if (needSeparator || accountHadSeparator) {
+ // Separate identities from this account from the previous
+ // account's identities if there is more than 1 in the current
+ // or previous account.
+ if (!firstAccountWithIdentities) {
+ // only if this is not the first account shown
+ let separator = document.createElement("menuseparator");
+ menulist.menupopup.appendChild(separator);
+ }
+ accountHadSeparator = needSeparator;
+ }
+ firstAccountWithIdentities = false;
+
+ for (let i = 0; i < identities.length; i++) {
+ let identity = identities[i];
+ let item = menulist.appendItem(identity.identityName, identity.key,
+ server.prettyName);
+ item.setAttribute("accountkey", account.key);
+ if (i === 0) {
+ // Mark the first identity as default.
+ item.setAttribute("default", "true");
+ }
+ }
+ }
+}
+
+function getCurrentAccountKey()
+{
+ // get the accounts key
+ var identityList = document.getElementById("msgIdentity");
+ return identityList.selectedItem.getAttribute("accountkey");
+}
+
+function setupAutocomplete()
+{
+ var autoCompleteWidget = document.getElementById("addressCol2#1");
+
+ // if the pref is set to turn on the comment column, honor it here.
+ // this element then gets cloned for subsequent rows, so they should
+ // honor it as well
+ //
+ try {
+ if (getPref("mail.autoComplete.highlightNonMatches")) {
+ autoCompleteWidget.highlightNonMatches = true;
+ }
+ if (getPref("mail.autoComplete.commentColumn")) {
+ autoCompleteWidget.showCommentColumn = true;
+ }
+ } catch (ex) {
+ // if we can't get this pref, then don't show the columns (which is
+ // what the XUL defaults to)
+ }
+
+ if (!gSetupLdapAutocomplete) {
+ try {
+ setupLdapAutocompleteSession();
+ } catch (ex) {
+ // catch the exception and ignore it, so that if LDAP setup
+ // fails, the entire compose window doesn't end up horked
+ }
+ }
+}
+
+function fromKeyPress(event)
+{
+ if (event.keyCode == KeyEvent.DOM_VK_RETURN) {
+ awSetFocus(1, awGetInputElement(1));
+ }
+}
+
+function LoadIdentity(startup)
+{
+ var identityElement = document.getElementById("msgIdentity");
+ var prevIdentity = gCurrentIdentity;
+
+ if (identityElement) {
+ var idKey = identityElement.value;
+ gCurrentIdentity = gAccountManager.getIdentity(idKey);
+
+ let accountKey = null;
+ // Set the account key value on the menu list.
+ if (identityElement.selectedItem) {
+ accountKey = identityElement.selectedItem.getAttribute("accountkey");
+ identityElement.setAttribute("accountkey", accountKey);
+ }
+
+ let maxRecipients = awGetMaxRecipients();
+ for (let i = 1; i <= maxRecipients; i++) {
+ let params = "{}";
+ if (typeof awGetInputElement(i).searchParam !== "undefined") {
+ params = JSON.parse(awGetInputElement(i).searchParam);
+ }
+ params.idKey = idKey;
+ params.accountKey = accountKey;
+ awGetInputElement(i).searchParam = JSON.stringify(params);
+ }
+
+ if (!startup && prevIdentity && idKey !== prevIdentity.key) {
+ var prefstring = "mail.identity." + prevIdentity.key;
+ RemoveDirectoryServerObserver(prefstring);
+ }
+
+ AddDirectoryServerObserver(false);
+ if (!startup) {
+ if (getPref("mail.autoComplete.highlightNonMatches")) {
+ document.getElementById("addressCol2#1").highlightNonMatches = true;
+ }
+
+ try {
+ setupLdapAutocompleteSession();
+ } catch (ex) {
+ // catch the exception and ignore it, so that if LDAP setup
+ // fails, the entire compose window doesn't end up horked
+ }
+ }
+ }
+}
+
+function GetMsgHdrForUri(msg_uri)
+{
+ var messenger = Cc["@mozilla.org/messenger;1"].
+ createInstance(Ci.nsIMessenger);
+ var mms = messenger.messageServiceFromURI(msg_uri).
+ QueryInterface(Ci.nsIMsgMessageService);
+ var hdr = null;
+
+ if (mms) {
+ try {
+ hdr = mms.messageURIToMsgHdr(msg_uri);
+ } catch (ex) { }
+ if (!hdr) {
+ try {
+ var url_o = new Object(); // return container object
+ mms.GetUrlForUri(msg_uri, url_o, msgWindow);
+ var url = url_o.value.QueryInterface(Ci.nsIMsgMessageUrl);
+ hdr = url.messageHeader;
+ } catch (ex) { }
+ }
+ }
+ if (!hdr && gDBView && gDBView.msgFolder) {
+ try {
+ hdr = gDBView.msgFolder.GetMessageHeader(gDBView.getKeyAt(gDBView.currentlyDisplayedMessage));
+ } catch (ex) { }
+ }
+
+ return hdr;
+}
+
+function BounceStartup(aParams)
+{
+ var params = null; // New way to pass parameters to the compose window as a nsIMsgComposeParameters object
+ var args = null; // old way, parameters are passed as a string
+
+ if (aParams) {
+ params = aParams;
+ } else {
+ if (window.arguments && window.arguments[0]) {
+ try {
+ if (window.arguments[0] instanceof Ci.nsIMsgComposeParams) {
+ params = window.arguments[0];
+ }
+ } catch(ex) {
+ dump("ERROR with parameters: " + ex + "\n");
+ }
+
+/*
+ // if still no dice, try and see if the params is an old fashioned list of string attributes
+ // XXX can we get rid of this yet?
+ if (!params) {
+ args = GetArgs(window.arguments[0]);
+ }
+*/
+ }
+ }
+
+ // Set a sane starting width/height for all resolutions on new profiles.
+ // Do this before the window loads.
+ if (!document.documentElement.hasAttribute("width")) {
+ // Prefer 600x350.
+ let defaultHeight = Math.min(screen.availHeight, 350);
+ let defaultWidth = Math.min(screen.availWidth, 600);
+
+ // On small screens, default to maximized state.
+ if (defaultHeight < 350) {
+ document.documentElement.setAttribute("sizemode", "maximized");
+ }
+
+ document.documentElement.setAttribute("width", defaultWidth);
+ document.documentElement.setAttribute("height", defaultHeight);
+ // Make sure we're safe at the left/top edge of screen
+ document.documentElement.setAttribute("screenX", screen.availLeft);
+ document.documentElement.setAttribute("screenY", screen.availTop);
+ }
+
+ var identityList = document.getElementById("msgIdentity");
+
+ document.addEventListener("keypress", awDocumentKeyPress, true);
+
+ if (identityList) {
+ FillIdentityList(identityList);
+ }
+
+ if (!params) {
+ // This code will go away soon as now arguments are passed to the window using a object of type nsMsgComposeParams instead of a string
+
+ params = Cc["@mozilla.org/messengercompose/composeparams;1"].
+ createInstance(Ci.nsIMsgComposeParams);
+ params.composeFields = Cc["@mozilla.org/messengercompose/composefields;1"].
+ createInstance(Ci.nsIMsgCompFields);
+
+ if (args) {
+ //Convert old fashion arguments into params
+ var composeFields = params.composeFields;
+ if (args.preselectid) {
+ params.identity = getIdentityForKey(args.preselectid);
+ }
+ if (args.to) {
+ composeFields.to = args.to;
+ }
+ if (args.cc) {
+ composeFields.cc = args.cc;
+ }
+ if (args.bcc) {
+ composeFields.bcc = args.bcc;
+ }
+ }
+ }
+
+ // " <>" is an empty identity, and most likely not valid
+ if (!params.identity || params.identity.identityName == " <>") {
+ // no pre selected identity, so use the default account
+ let identities = MailServices.accounts.defaultAccount.identities;
+ if (identities.length == 0) {
+ identities = MailServices.accounts.allIdentities;
+ }
+ if (identities.queryElementAt) {
+ params.identity = identities.queryElementAt(0, Ci.nsIMsgIdentity);
+ } else {
+ params.identity = identities.QueryElementAt(0, Ci.nsIMsgIdentity);
+ }
+ }
+
+ var preSelectedIdentityKey = null;
+ if (window.arguments) {
+ mstate.selectedURIs = window.arguments[0];
+ if (mstate.selectedURIs) {
+ mstate.size = mstate.selectedURIs.length;
+ clearMState();
+ var msgHdr = GetMsgHdrForUri(mstate.selectedURIs[0]);
+ if (msgHdr) {
+ msgSubject = msgHdr.mime2DecodedSubject;
+ if (msgSubject) {
+ let BounceMsgsBundle = document.getElementById("bundle_mailredirect");
+ document.title = BounceMsgsBundle.getString("mailredirectWindowTitlePrefix") + " " + msgSubject;
+ }
+ }
+ }
+ preSelectedIdentityKey = window.arguments[1];
+ }
+
+ if (!preSelectedIdentityKey) {
+ // no pre selected identity, so use the default account
+ var identities = gAccountManager.defaultAccount.identities;
+ if ((typeof identities.length !== "undefined" && identities.length === 0) ||
+ (typeof identities.Count !== "undefined" && identities.Count() === 0)) {
+ identities = gAccountManager.allIdentities;
+ }
+ if (identities.queryElementAt) {
+ preSelectedIdentityKey = identities.queryElementAt(0, Ci.nsIMsgIdentity).key;
+ } else {
+ preSelectedIdentityKey = identities.QueryElementAt(0, Ci.nsIMsgIdentity).key;
+ }
+ }
+
+ identityList.value = preSelectedIdentityKey;
+ LoadIdentity(true);
+
+ gMsgCompose = MailServices.compose.initCompose(params, window);
+
+ // fill bounceTree with information about bounced mails
+
+ if (mstate.selectedURIs) {
+ var aTree = document.getElementById("topTreeChildren");
+
+ var messenger = Cc["@mozilla.org/messenger;1"].
+ createInstance(Ci.nsIMessenger);
+
+ var locale = undefined;
+ var dateFormatService = undefined;
+
+ var dateFormatDefault = getPref("mail.ui.display.dateformat.default");
+ var dateFormatThisWeek = getPref("mail.ui.display.dateformat.thisweek");
+ var dateFormatToday = getPref("mail.ui.display.dateformat.today");
+
+ if (dateFormatDefault === null) {
+ dateFormatDefault = kDateFormatShort;
+ }
+ if (dateFormatThisWeek === null) {
+ dateFormatThisWeek = kDateFormatShort;
+ }
+ if (dateFormatToday === null) {
+ dateFormatToday = kDateFormatNone;
+ }
+
+ var today = new Date();
+
+ for (let i = 0; i < mstate.size; ++i) {
+ var aRow = document.createElement("treerow");
+ aRow.setAttribute("messageURI", mstate.selectedURIs[i]);
+ aRow.setAttribute("URIidx", i);
+ aRow.setAttribute("disableonsend", true);
+
+ dumper.dump("[" + i + "] " + mstate.selectedURIs[i]);
+ var msgService = messenger.messageServiceFromURI(mstate.selectedURIs[i]);
+ var msgSubject = "";
+ var msgAuthor = "";
+ var msgDate = null;
+ var propertiesString = "";
+ var msgHdr = GetMsgHdrForUri(mstate.selectedURIs[i]);
+ if (msgHdr) {
+ msgSubject = msgHdr.mime2DecodedSubject;
+ msgAuthor = msgHdr.mime2DecodedAuthor;
+ msgDate = msgHdr.date;
+ if (isNewsURI(mstate.selectedURIs[i])) {
+ propertiesString += " news";
+ }
+ if (msgHdr.flags & 0x0001) {
+ propertiesString += " read";
+ }
+ if (msgHdr.flags & 0x0002) {
+ propertiesString += " replied";
+ }
+ if (msgHdr.flags & 0x1000) {
+ propertiesString += " forwarded";
+ }
+ if (msgHdr.flags & 0x10000) {
+ propertiesString += " new";
+ }
+ if (/(?:^| )redirected(?: |$)/.test(msgHdr.getStringProperty("keywords"))) {
+ propertiesString += " kw-redirected";
+ }
+ } else {
+ if (currMsgWindow && currMsgWindow.messageHeaderSink) {
+ msgHdr = currMsgWindow.messageHeaderSink.dummyMsgHeader;
+ if (msgHdr) {
+ msgSubject = msgHdr.subject;
+ msgAuthor = msgHdr.author;
+ }
+ }
+ }
+
+ var aCell = document.createElement("treecell");
+ aCell.setAttribute("label", msgSubject);
+ aCell.setAttribute("properties", propertiesString);
+ aRow.appendChild(aCell);
+
+ var aCell = document.createElement("treecell");
+ aCell.setAttribute("label", msgAuthor);
+ aRow.appendChild(aCell);
+
+ var aCell = document.createElement("treecell");
+ var dateString = "";
+ if (msgDate) {
+ var date = new Date();
+ date.setTime(msgDate / 1000);
+
+ var dateFormat = dateFormatDefault;
+ if (date.getFullYear() === today.getFullYear() &&
+ date.getMonth() === today.getMonth() &&
+ date.getDate() === today.getDate()) {
+ dateFormat = dateFormatToday;
+ } else if (today > date) {
+ var todaysMilliSeconds = today.getTime() % PR_MSEC_PER_DAY;
+ var mostRecentMidnight = today.getTime() - todaysMilliSeconds;
+ var mostRecentWeek = mostRecentMidnight - 6*PR_MSEC_PER_DAY;
+ // was the message sent during the last week?
+ if (date.getTime() >= mostRecentWeek) {
+ dateFormat = dateFormatThisWeek;
+ }
+ }
+ if (Services.intl !== undefined &&
+ (typeof Services.intl.DateTimeFormat === "function" || // Thunderbird 59.0a1
+ typeof Services.intl.createDateTimeFormat === "function")) { // Thunderbird 57.0a1
+ if (locale === undefined) {
+ var useOSLocales = getPref("intl.regional_prefs.use_os_locales");
+ if (useOSLocales) {
+ var osprefs = Cc["@mozilla.org/intl/ospreferences;1"].
+ getService(Ci.mozIOSPreferences);
+ if (typeof(osprefs.regionalPrefsLocales) === "object") {
+ // Thunderbird 64 (Bug 1493220 - Migrate mozIOSPreferences to use Array<>)
+ locale = osprefs.regionalPrefsLocales[0];
+ } else {
+ locale = osprefs.getRegionalPrefsLocales()[0];
+ }
+ } else {
+ locale = null;
+ }
+ }
+ var dateOption = {dateStyle: "short", timeStyle: "short"};
+ if (dateFormat === kDateFormatNone) {
+ dateOption = {timeStyle: "short"};
+ } else if (dateFormat === kDateFormatLong) {
+ dateOption = {dateStyle: "long", timeStyle: "short"};
+ } else if (dateFormat === kDateFormatShort) {
+ dateOption = {dateStyle: "short", timeStyle: "short"};
+ } else if (dateFormat === kDateFormatYearMonth) {
+ dateOption = {year: "numeric", month: "2-digit", hour: "numeric", minute: "numeric"};
+ } else if (dateFormat === kDateFormatWeekday) {
+ dateOption = {weekday: "short", hour: "numeric", minute: "numeric"};
+ }
+ if (typeof Services.intl.DateTimeFormat === "function") {
+ dateString = new Services.intl.DateTimeFormat(locale, dateOption).format(date);
+ } else {
+ dateString = Services.intl.createDateTimeFormat(locale, dateOption).format(date);
+ }
+ } else {
+ if (dateFormatService === undefined) {
+ dateFormatService = Cc["@mozilla.org/intl/scriptabledateformat;1"].
+ getService(Ci.nsIScriptableDateFormat);
+ }
+ dateString = dateFormatService.FormatDateTime("",
+ dateFormat, dateFormatService.timeFormatNoSeconds,
+ date.getFullYear(), date.getMonth()+1, date.getDate(),
+ date.getHours(), date.getMinutes(), date.getSeconds());
+ }
+ }
+ aCell.setAttribute("label", dateString);
+ aRow.appendChild(aCell);
+
+ var aItem = document.createElement("treeitem");
+ aItem.appendChild(aRow);
+ aTree.appendChild(aItem);
+ }
+ }
+
+ window.controllers.appendController(MailredirectWindowController);
+
+ updateEditableFields(false);
+ AdjustFocus();
+ setTimeout(function() { awFitDummyRows() }, 0);
+
+ window.onresize = function() {
+ // dumper.dump("window.onresize func");
+ awFitDummyRows();
+ }
+
+ // Before and after callbacks for the customizeToolbar code
+ var toolbox = document.getElementById("bounce-toolbox");
+ if (gAppInfoID === THUNDERBIRD_ID) {
+ toolbox.customizeDone = function(aEvent) { MailToolboxCustomizeDone(aEvent, "CustomizeMailredirectToolbar"); };
+ } else if (gAppInfoID === SEAMONKEY_ID) {
+ toolbox.customizeInit = BounceToolboxCustomizeInit;
+ toolbox.customizeDone = BounceToolboxCustomizeDone;
+ toolbox.customizeChange = BounceToolboxCustomizeChange;
+ }
+
+ var toolbarset = document.getElementById("customToolbars");
+ toolbox.toolbarset = toolbarset;
+
+ awSetAutoComplete(1); // somehow this doesn't get set otherwise
+ awInitializeNumberOfRowsShown();
+
+ var event = document.createEvent("Events");
+ event.initEvent("compose-window-init", false, true);
+ document.getElementById("msgMailRedirectWindow").dispatchEvent(event);
+
+ // Change the Address Book button to the Contacts button in the toolbar on first run
+ let firstRunPref = "extensions.mailredirect.firstrun.button-contacts";
+ if (!getPref(firstRunPref)) {
+ Services.prefs.setBoolPref(firstRunPref, true);
+ var toolbar = document.getElementById("bounceToolbar");
+ var before = null;
+ let buttonContacts = document.getElementById("button-contacts")
+ if (!buttonContacts || buttonContacts.parentNode !== toolbar) {
+ let buttonAddressBook = document.getElementById("button-address");
+ if (buttonAddressBook && buttonAddressBook.parentNode === toolbar) {
+ before = buttonAddressBook.nextElementSibling;
+ toolbar.removeChild(buttonAddressBook);
+ }
+ toolbar.insertItem("button-contacts", before);
+ toolbar.setAttribute("currentset", toolbar.currentSet);
+ document.persist(toolbar.id, "currentset");
+ }
+ }
+
+ // finally, see if we need to auto open the address sidebar.
+ var sideBarBox = document.getElementById("sidebar-box");
+ if (sideBarBox.getAttribute("sidebarVisible") === "true") {
+ // if we aren't supposed to have the side bar hidden, make sure it is visible
+ if (document.getElementById("sidebar").getAttribute("src") === "") {
+ setTimeout(toggleAddressPicker, 0); // do this on a delay so we don't hurt perf. on bringing up a new bounce window
+ }
+ }
+
+ // Initialization for Dark/Light theme (TB60+)
+ try {
+ CompactTheme.init();
+ } catch(ex) { }
+
+ // Update the status of the redirect button (in case default recipients are specified)
+ updateSendCommands(false);
+}
+
+function WizCallback(state)
+{
+ if (state){
+ BounceStartup(null);
+ } else {
+ // The account wizard is still closing so we can't close just yet
+ setTimeout(MsgComposeCloseWindow, 0, false); // Don't recycle a bogus window
+ }
+}
+
+function MsgComposeCloseWindow(recycleIt)
+{
+ if (gMsgCompose) {
+ gMsgCompose.CloseWindow(recycleIt);
+ } else {
+ window.close();
+ }
+}
+
+/**
+ * Expands mailinglists found in the recipient fields.
+ */
+function expandRecipients()
+{
+ gMsgCompose.expandMailingLists();
+}
+
+function BounceLoad()
+{
+ gAccountManager = Cc["@mozilla.org/messenger/account-manager;1"].
+ getService(Ci.nsIMsgAccountManager);
+ var windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
+ getService(Ci.nsIWindowMediator);
+ var mail3paneWindow = windowMediator.getMostRecentWindow("mail:3pane");
+ var currMsgWindow = windowMediator.getMostRecentWindow("mail:messageWindow");
+
+ setupAutocomplete();
+
+ // Check to see if CardBook is installed in order to modify autocomplete
+ let cardbookCallback = function(aAddon) {
+ if (aAddon !== null && aAddon.isActive) {
+ var cardbookAutocompletion = getPref("extensions.cardbook.autocompletion");
+ if (cardbookAutocompletion) {
+ var listitem = 1;
+ var textbox = document.getElementById("addressCol2#" + listitem);
+ while (textbox !== null) {
+ // listitems can already be cloned, so we need to adjust them all
+ var cardbookExclusive = getPref("extensions.cardbook.exclusive");
+ if (cardbookExclusive) {
+ textbox.setAttribute("autocompletesearch", "addrbook-cardbook");
+ } else {
+ var autocompletesearch = textbox.getAttribute("autocompletesearch");
+ textbox.setAttribute("autocompletesearch", "addrbook-cardbook " + autocompletesearch);
+ }
+ listitem++;
+ var textbox = document.getElementById("addressCol2#" + listitem);
+ }
+ }
+ }
+ };
+ AddonManager.getAddonByID("cardbook@vigneau.philippe", cardbookCallback);
+
+ // copy toolbar appearance settings from mail3pane
+ if (mail3paneWindow) {
+ var aBounceToolbar = document.getElementById("bounceToolbar");
+ if (aBounceToolbar) {
+ var mailBar = mail3paneWindow.document.getElementById("mail-bar");
+ if (mailBar) {
+ aBounceToolbar.setAttribute("iconsize", mailBar.getAttribute("iconsize"));
+ aBounceToolbar.setAttribute("mode", mailBar.getAttribute("mode"));
+ }
+ }
+ }
+
+ var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
+ gAppInfoID = appInfo.ID;
+ gAppInfoPlatformVersion = parseInt(appInfo.platformVersion.replace(/\..*/,''));
+ if (gAppInfoPlatformVersion < 65) {
+ // Hide html progress and show old progressmeter
+ var elem = document.getElementById("status-bar");
+ if (elem) {
+ elem.setAttribute("collapsed", "true");
+ }
+ elem = document.getElementById("status-bar-pre65");
+ elem.removeAttribute("collapsed");
+ }
+ if (gAppInfoID === THUNDERBIRD_ID && gAppInfoPlatformVersion < 31) {
+ var textbox = document.getElementById("addressCol2#1");
+ textbox.setAttribute("ontextentered", "awRecipientTextCommandPre31(eventParam, this)");
+ textbox.removeAttribute("onblur");
+ }
+
+ awInitializeNumberOfRowsShown();
+
+ // get defaults for Resent-To, Resent-Cc and Resent-Bcc from preferences
+ var defaultResentToString = "";
+ var defaultResentCcString = "";
+ var defaultResentBccString = "";
+ try {
+ defaultResentToString = Services.prefs.getCharPref("extensions.mailredirect.defaultResentTo").replace(/^\s+|\s+$/g, "");
+ defaultResentCcString = Services.prefs.getCharPref("extensions.mailredirect.defaultResentCc").replace(/^\s+|\s+$/g, "");
+ defaultResentBccString = Services.prefs.getCharPref("extensions.mailredirect.defaultResentBcc").replace(/^\s+|\s+$/g, "");
+ }
+ catch (ex) {
+ // do nothing...
+ }
+
+ // set defaults for Resent-To, Resent-Cc and Resent-Bcc in the bounce dialog
+ if (!(defaultResentToString.match(/^\s*$/) &&
+ defaultResentCcString.match(/^\s*$/) &&
+ defaultResentBccString.match(/^\s*$/))) {
+ var addr;
+ if (defaultResentToString !== "") {
+ var defaultResentToArray = defaultResentToString.split(",");
+ for (var idx in defaultResentToArray) {
+ addr = defaultResentToArray[idx].replace(/^\s+|\s+$/g, "");
+ if (addr !== "") {
+ awAddRecipient("addr_to", addr);
+ }
+ }
+ }
+ if (defaultResentCcString !== "") {
+ var defaultResentCcArray = defaultResentCcString.split(",");
+ for (var idx in defaultResentCcArray) {
+ addr = defaultResentCcArray[idx].replace(/^\s+|\s+$/g, "");
+ if (addr !== "") {
+ awAddRecipient("addr_cc", addr);
+ }
+ }
+ }
+ if (defaultResentBccString !== "") {
+ var defaultResentBccArray = defaultResentBccString.split(",");
+ for (var idx in defaultResentBccArray) {
+ addr = defaultResentBccArray[idx].replace(/^\s+|\s+$/g, "");
+ if (addr !== "") {
+ awAddRecipient("addr_bcc", addr);
+ }
+ }
+ }
+ } else {
+ var menulist = document.getElementById("addressCol1#1");
+ var defaultMode = getPref("extensions.mailredirect.defaultMode");
+ menulist.value = defaultMode;
+ }
+ awFitDummyRows();
+
+ AddDirectoryServerObserver(true);
+
+ try {
+ // XXX: We used to set commentColumn on the initial auto complete column after the document has loaded
+ // inside of setupAutocomplete. But this happens too late for the first widget and it was never showing
+ // the comment field. Try to set it before the document finishes loading:
+ if (getPref("mail.autoComplete.commentColumn")) {
+ document.getElementById("addressCol2#1").showCommentColumn = true;
+ }
+ }
+ catch (ex) {
+ // do nothing...
+ }
+
+ try {
+ // This will do migration, or create a new account if we need to.
+ // We also want to open the account wizard if no identities are found
+ var state = verifyAccounts(WizCallback, true);
+ if (state) {
+ BounceStartup(null);
+ }
+ }
+ catch (ex) {
+ Components.utils.reportError(ex);
+ var BounceMsgsBundle = document.getElementById("bundle_mailredirect");
+ var errorTitle = BounceMsgsBundle.getString("initErrorDlogTitle");
+ var errorMsg = BounceMsgsBundle.getString("initErrorDlogMessage");
+ Services.prompt.alert(window, errorTitle, errorMsg);
+ DoCommandClose();
+ return;
+ }
+}
+
+function AdjustFocus()
+{
+ var numOfRecipients = awGetNumberOfRecipients();
+ var element = document.getElementById("addressCol2#" + numOfRecipients);
+ if (element.value === "") {
+ awSetFocus(numOfRecipients, element);
+ }
+}
+
+function BounceUnload()
+{
+ // dumper.dump("\nBounceUnload from XUL\n");
+
+ RemoveDirectoryServerObserver(null);
+ if (gCurrentIdentity) {
+ RemoveDirectoryServerObserver("mail.identity." + gCurrentIdentity.key);
+ }
+ if (gCurrentAutocompleteDirectory) {
+ RemoveDirectorySettingsObserver(gCurrentAutocompleteDirectory);
+ }
+ if (msgWindow) {
+ msgWindow.closeWindow();
+ }
+ ReleaseGlobalVariables();
+}
+
+/**
+ * Disables or enables editable elements in the window.
+ * The elements to operate on are marked with the "disableonsend" attribute.
+ * This includes elements like the address list, attachment list, subject
+ * and message body.
+ *
+ * @param aDisable true = disable items. false = enable items.
+ */
+function updateEditableFields(aDisable)
+{
+ let elements = document.querySelectorAll("[disableonsend=\"true\"]");
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].disabled = aDisable;
+ }
+}
+
+function ExitFullscreenMode()
+{
+ // On OS X we need to deliberately exit full screen mode before closing.
+ if (typeof AppConstants !== "undefined") {
+ if (AppConstants.platformIsMac) {
+ window.fullscreen = false;
+ }
+ } else {
+ if (Application.platformIsMac) {
+ window.fullscreen = false;
+ }
+ }
+}
+
+function DoCommandClose()
+{
+ window.MeteorsStatus = null;
+ window.msgSendListener = null;
+ window.msgStatusFeedback = null
+
+ for (var i = 0; i < mstate.size; ++i) {
+ if (mstate.sendOperationInProgress[i]) {
+ dumper.dump("aborting mail no " + i);
+ mstate.msgSendObj[i].abort();
+ }
+ }
+ clearMState();
+ ExitFullscreenMode();
+ window.close();
+ return false;
+}
+
+function DoForwardBounceWithCheck()
+{
+ var warn = getPref("mail.warn_on_send_accel_key");
+
+ if (warn) {
+ var checkValue = {value: false};
+ let BounceMsgsBundle = document.getElementById("bundle_mailredirect");
+ let pluralRule = BounceMsgsBundle.getString("pluralRule");
+ let [get, numForms] = PluralForm.makeGetter(pluralRule);
+ let selectedCount = mstate.size;
+ let textValue = BounceMsgsBundle.getString("sendMessageCheckWindowTitleMsgs");
+ let windowTitle = PluralForm.get(selectedCount, textValue);
+ textValue = BounceMsgsBundle.getString("sendMessageCheckLabelMsgs");
+ let label = get(selectedCount, textValue);
+
+ var buttonPressed = Services.prompt.confirmEx(window, windowTitle, label,
+ (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
+ (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1),
+ BounceMsgsBundle.getString("sendMessageCheckSendButtonLabel"),
+ null, null,
+ BounceMsgsBundle.getString("CheckMsg"),
+ checkValue);
+ if (buttonPressed !== 0) {
+ return;
+ }
+ if (checkValue.value) {
+ Services.prefs.setBoolPref("mail.warn_on_send_accel_key", false);
+ }
+ }
+ DoForwardBounce();
+}
+
+function DoForwardBounce()
+{
+ mailredirectRecipients = null;
+
+ let msgCompFields = gMsgCompose.compFields;
+ Recipients2CompFields(msgCompFields);
+ // hasRecipients is new to Thunderbird 23
+ if (typeof msgCompFields.hasRecipients !== "undefined"
+ ? !msgCompFields.hasRecipients
+ : (msgCompFields.to.match(/^\s*$/) &&
+ msgCompFields.cc.match(/^\s*$/) &&
+ msgCompFields.bcc.match(/^\s*$/))) {
+ var BounceMsgsBundle = document.getElementById("bundle_mailredirect");
+ var errorTitle = BounceMsgsBundle.getString("noRecipientsTitle");
+ var errorMsg = BounceMsgsBundle.getFormattedString("noRecipientsMessage", [""]);
+ Services.prompt.alert(window, errorTitle, errorMsg);
+ return;
+ }
+ if (mstate.size === 0) {
+ var BounceMsgsBundle = document.getElementById("bundle_mailredirect");
+ var errorTitle = BounceMsgsBundle.getString("noMessagesTitle");
+ var errorMsg = BounceMsgsBundle.getFormattedString("noMessagesMessage", [""]);
+ Services.prompt.alert(window, errorTitle, errorMsg);
+ return;
+ }
+ // clear some variables
+ aSender = null;
+ clearMState();
+ RealBounceMessages();
+}
+
+// we can drag and drop addresses and messages into the mailredirect envelope
+var mailredirectDragObserver = {
+
+ canHandleMultipleItems: true,
+
+ onDrop: function (aEvent, aData, aDragSession) {
+ var aTree = document.getElementById("topTreeChildren");
+ if (!aTree.disabled) {
+ var dataList = aData.dataList;
+ var dataListLength = dataList.length;
+ var errorTitle;
+ var attachment;
+ var errorMsg;
+
+ var locale = undefined;
+ var dateFormatService = undefined;
+
+ var dateFormatDefault = getPref("mail.ui.display.dateformat.default");
+ var dateFormatThisWeek = getPref("mail.ui.display.dateformat.thisweek");
+ var dateFormatToday = getPref("mail.ui.display.dateformat.today");
+
+ if (dateFormatDefault === null) {
+ dateFormatDefault = kDateFormatShort;
+ }
+ if (dateFormatThisWeek === null) {
+ dateFormatThisWeek = kDateFormatShort;
+ }
+ if (dateFormatToday === null) {
+ dateFormatToday = kDateFormatNone;
+ }
+
+ var today = new Date();
+
+ for (var i = 0; i < dataListLength; i++) {
+ var item = dataList[i].first;
+ var prettyName;
+ var size;
+ var rawData = item.data;
+
+ if (item.flavour.contentType === "text/x-moz-message") {
+ if (mstate.selectedURIs.indexOf(rawData) === -1) {
+ var i = mstate.size++;
+ mstate.selectedURIs.push(rawData);
+ dumper.dump("[" + i + "] " + mstate.selectedURIs[i]);
+
+ var aRow = document.createElement("treerow");
+ aRow.setAttribute("messageURI", rawData);
+ aRow.setAttribute("URIidx", i);
+ aRow.setAttribute("disableonsend", true);
+
+ var msgService = gMessenger.messageServiceFromURI(mstate.selectedURIs[i]);
+ var msgSubject = "";
+ var msgAuthor = "";
+ var msgDate = null;
+ var propertiesString = "";
+ var msgHdr = GetMsgHdrForUri(mstate.selectedURIs[i]);
+ if (msgHdr) {
+ msgSubject = msgHdr.mime2DecodedSubject;
+ msgAuthor = msgHdr.mime2DecodedAuthor;
+ msgDate = msgHdr.date;
+ if (isNewsURI(mstate.selectedURIs[i])) {
+ propertiesString += " news";
+ }
+ if (msgHdr.flags & 0x0001) {
+ propertiesString += " read";
+ }
+ if (msgHdr.flags & 0x0002) {
+ propertiesString += " replied";
+ }
+ if (msgHdr.flags & 0x1000) {
+ propertiesString += " forwarded";
+ }
+ if (msgHdr.flags & 0x10000) {
+ propertiesString += " new";
+ }
+ if (/(?:^| )redirected(?: |$)/.test(msgHdr.getStringProperty("keywords"))) {
+ propertiesString += " kw-redirected";
+ }
+ } else {
+ if (currMsgWindow && currMsgWindow.messageHeaderSink) {
+ msgHdr = currMsgWindow.messageHeaderSink.dummyMsgHeader;
+ if (msgHdr) {
+ msgSubject = msgHdr.subject;
+ msgAuthor = msgHdr.author;
+ }
+ }
+ }
+
+ var aCell = document.createElement("treecell");
+ aCell.setAttribute("label", msgSubject);
+ aCell.setAttribute("properties", propertiesString);
+ aRow.appendChild(aCell);
+
+ var aCell = document.createElement("treecell");
+ aCell.setAttribute("label", msgAuthor);
+ aRow.appendChild(aCell);
+
+ var aCell = document.createElement("treecell");
+ var dateString = "";
+ if (msgDate) {
+ var date = new Date();
+ date.setTime(msgDate / 1000);
+
+ var dateFormat = dateFormatDefault;
+ if (date.getFullYear() === today.getFullYear() &&
+ date.getMonth() === today.getMonth() &&
+ date.getDate() === today.getDate()) {
+ dateFormat = dateFormatToday;
+ } else if (today > date) {
+ var todaysMilliSeconds = today.getTime() % PR_MSEC_PER_DAY;
+ var mostRecentMidnight = today.getTime() - todaysMilliSeconds;
+ var mostRecentWeek = mostRecentMidnight - 6*PR_MSEC_PER_DAY;
+ // was the message sent during the last week?
+ if (date.getTime() >= mostRecentWeek) {
+ dateFormat = dateFormatThisWeek;
+ }
+ }
+ if (Services.intl !== undefined &&
+ (typeof Services.intl.DateTimeFormat === "function" || // Thunderbird 59.0a1
+ typeof Services.intl.createDateTimeFormat === "function")) { // Thunderbird 57.0a1
+ if (locale === undefined) {
+ var useOSLocales = getPref("intl.regional_prefs.use_os_locales");
+ if (useOSLocales) {
+ var osprefs = Cc["@mozilla.org/intl/ospreferences;1"].
+ getService(Ci.mozIOSPreferences);
+ if (typeof(osprefs.regionalPrefsLocales) === "object") {
+ // Thunderbird 64 (Bug 1493220 - Migrate mozIOSPreferences to use Array<>)
+ locale = osprefs.regionalPrefsLocales[0];
+ } else {
+ locale = osprefs.getRegionalPrefsLocales()[0];
+ }
+ } else {
+ locale = null;
+ }
+ }
+ var dateOption = {dateStyle: "short", timeStyle: "short"};
+ if (dateFormat === kDateFormatNone) {
+ dateOption = {timeStyle: "short"};
+ } else if (dateFormat === kDateFormatLong) {
+ dateOption = {dateStyle: "long", timeStyle: "short"};
+ } else if (dateFormat === kDateFormatShort) {
+ dateOption = {dateStyle: "short", timeStyle: "short"};
+ } else if (dateFormat === kDateFormatYearMonth) {
+ dateOption = {year: "numeric", month: "2-digit", hour: "numeric", minute: "numeric"};
+ } else if (dateFormat === kDateFormatWeekday) {
+ dateOption = {weekday: "short", hour: "numeric", minute: "numeric"};
+ }
+ if (typeof Services.intl.DateTimeFormat === "function") {
+ dateString = new Services.intl.DateTimeFormat(locale, dateOption).format(date);
+ } else {
+ dateString = Services.intl.createDateTimeFormat(locale, dateOption).format(date);
+ }
+ } else {
+ if (dateFormatService === undefined) {
+ dateFormatService = Cc["@mozilla.org/intl/scriptabledateformat;1"].
+ getService(Ci.nsIScriptableDateFormat);
+ }
+ dateString = dateFormatService.FormatDateTime("",
+ dateFormat, dateFormatService.timeFormatNoSeconds,
+ date.getFullYear(), date.getMonth()+1, date.getDate(),
+ date.getHours(), date.getMinutes(), date.getSeconds());
+ }
+ }
+ aCell.setAttribute("label", dateString);
+ aRow.appendChild(aCell);
+
+ var aItem = document.createElement("treeitem");
+ aItem.appendChild(aRow);
+ aTree.appendChild(aItem);
+ }
+ } else if (item.flavour.contentType === "text/x-moz-address") {
+ // process the address
+ if (rawData) {
+ DropRecipient(aEvent.target, rawData);
+
+ // Since we are now using ondrop (eDrop) instead of previously using
+ // ondragdrop (eLegacyDragDrop), we must prevent the default
+ // which is dropping the address text into the widget.
+ // Note that stopPropagation() is called by our caller in
+ // nsDragAndDrop.js.
+ aEvent.preventDefault();
+ }
+ }
+ }
+ }
+ },
+
+ onDragOver: function (aEvent, aFlavour, aDragSession) { },
+
+ onDragExit: function (aEvent, aDragSession) { },
+
+ getSupportedFlavours: function () {
+ var flavourSet = new FlavourSet();
+ flavourSet.appendFlavour("text/x-moz-address");
+ flavourSet.appendFlavour("text/x-moz-message");
+ return flavourSet;
+ }
+};
+
+/**********************************************
+ **********************************************/
+
+function createTempFile()
+{
+ var dirService = Cc["@mozilla.org/file/directory_service;1"].
+ getService(Ci.nsIProperties)
+ var tmpDir = dirService.get("TmpD", Ci.nsIFile)
+
+ var file;
+
+ try {
+ file = Cc["@mozilla.org/file/local;1"].
+ createInstance(Ci.nsIFile);
+ file.initWithPath(tmpDir.path);
+ } catch(ex) {
+ // Starting with Gecko 14, `nsILocalFile` inherits all functions and attributes from `nsIFile`
+ file = Cc["@mozilla.org/file/local;1"].
+ createInstance(Ci.nsILocalFile);
+ file.initWithPath(tmpDir.path);
+ }
+ file.appendRelativePath("mailredirect.tmp");
+
+ try {
+ file.createUnique(file.NORMAL_FILE_TYPE, parseInt("0600", 8));
+ } catch(ex) {
+ return null;
+ }
+
+ return file;
+}
+
+function FileSpecFromLocalFile(localfile)
+{
+ var filespec = Cc["@mozilla.org/filespec;1"].createInstance(Ci.nsIFileSpec);
+ filespec.nativePath = localfile.path;
+ return filespec;
+}
+
+function encodeMimeHeader(header)
+{
+ let fieldNameLen = (header.indexOf(": ") + 2);
+ if (header.length <= MAX_HEADER_LENGTH) {
+ header = header.replace(/\r\n$/, ""); // Don't encode closing end of line
+ return header.substr(0, fieldNameLen) + // and don't encode field name
+ MailServices.mimeConverter.
+ encodeMimePartIIStr_UTF8(header.substr(fieldNameLen), true, "UTF-8", fieldNameLen,
+ Ci.nsIMimeConverter.MIME_ENCODED_WORD_SIZE) + "\r\n";
+ } else {
+ header = header.replace(/\r\n$/, "");
+ let fieldName = header.substr(0, fieldNameLen);
+ let splitHeader = "";
+ let currentLine = "";
+ while (header.length > MAX_HEADER_LENGTH - 2) {
+ let splitPos = header.substr(0, MAX_HEADER_LENGTH - 2).lastIndexOf(","); // Try to split before MAX_HEADER_LENGTH
+ if (splitPos === -1) {
+ splitPos = header.indexOf(","); // If that fails, split at first possible position
+ }
+ if (splitPos === -1) {
+ currentLine = header;
+ header = "";
+ } else {
+ currentLine = header.substr(0, splitPos);
+ if (header.charAt(splitPos + 1) === " ") {
+ header = fieldName + header.substr(splitPos + 2);
+ } else {
+ header = fieldName + header.substr(splitPos + 1);
+ }
+ }
+ splitHeader += currentLine.substr(0, fieldNameLen) + // Don't encode field name
+ MailServices.mimeConverter.
+ encodeMimePartIIStr_UTF8(currentLine.substr(fieldNameLen), true, "UTF-8", fieldNameLen,
+ Ci.nsIMimeConverter.MIME_ENCODED_WORD_SIZE) + "\r\n";
+ }
+ splitHeader += header.substr(0, fieldNameLen) + // Don't encode field name
+ MailServices.mimeConverter.
+ encodeMimePartIIStr_UTF8(header.substr(fieldNameLen), true, "UTF-8", fieldNameLen,
+ Ci.nsIMimeConverter.MIME_ENCODED_WORD_SIZE) + "\r\n";
+ return(splitHeader);
+ }
+}
+
+function getSender()
+{
+ if (!aSender) {
+ // makeFullAddress was changed to makeMimeHeader in Thunderbird 29 (bug 842632)
+ if (typeof MailServices.headerParser.makeMimeHeader === "function") {
+ aSender = MailServices.headerParser.makeMimeHeader([{name: gCurrentIdentity.fullName, email: gCurrentIdentity.email}], 1);
+ } else {
+ aSender = MailServices.headerParser.makeFullAddress(gCurrentIdentity.fullName,
+ gCurrentIdentity.email);
+ }
+ }
+ return aSender;
+}
+
+function getRecipients(onlyemails)
+{
+ if (!mailredirectRecipients) {
+ var aRecipients_sep = { resendTo: "", resendCc: "", resendBcc: "" };
+ var recipients = { resendTo: "", resendCc: "", resendBcc: "" };
+ var i = 1, inputField;
+ while ((inputField = awGetInputElement(i))) {
+ var fieldValue = inputField.value;
+
+ if (fieldValue === null) {
+ fieldValue = inputField.getAttribute("value");
+ }
+ if (fieldValue !== "") {
+ var recipientType = awGetPopupElement(i).selectedItem.getAttribute("value");
+ var recipient;
+
+ try {
+ recipient = MailServices.headerParser.reformatUnquotedAddresses(fieldValue);
+ } catch (ex) {
+ recipient = fieldValue;
+ }
+ var recipientType2;
+ switch (recipientType) {
+ case "addr_to" : recipientType2 = "resendTo"; break;
+ case "addr_cc" : recipientType2 = "resendCc"; break;
+ case "addr_bcc" : recipientType2 = "resendBcc"; break;
+ }
+ recipients[recipientType2] += aRecipients_sep[recipientType2] + recipient;
+ aRecipients_sep[recipientType2] = ",";
+ }
+ i++;
+ }
+
+ mailredirectRecipients = { resendTo : [], resendCc : [], resendBcc : [] };
+ for (var recipType in recipients) {
+ var emails = {};
+ var names = {};
+ var fullnames = {};
+ var numAddresses = MailServices.headerParser.parseHeadersWithArray(recipients[recipType], emails, names, fullnames);
+
+ // dumper.dump("numAddresses[" + recipType + "]= " + numAddresses);
+
+ for (var i = 0; i < numAddresses; ++i) {
+ mailredirectRecipients[recipType][i] = {
+ email: emails.value[i],
+ name: names.value[i],
+ fullname: fullnames.value[i]
+ };
+ }
+ }
+ ResolveMailLists();
+ RemoveDupAddresses();
+ for (var recipType in mailredirectRecipients) {
+ for (var i in mailredirectRecipients[recipType]) {
+ mailredirectRecipients[recipType][i].encname = mailredirectRecipients[recipType][i].name;
+ }
+ }
+ }
+
+ var ret = [];
+ for (var recipType in mailredirectRecipients) {
+ var count = mailredirectRecipients[recipType].length;
+ var tmp = [];
+ if (onlyemails === true) {
+ for (var i = 0; i < count; ++i) {
+ tmp[i] = mailredirectRecipients[recipType][i].email;
+ }
+ } else {
+ for (var i = 0; i < count; ++i) {
+ tmp[i] = MailServices.headerParser.
+ makeFullAddress(mailredirectRecipients[recipType][i].encname,
+ mailredirectRecipients[recipType][i].email);
+ }
+ }
+
+ ret[recipType] = tmp.join(", ");
+ // dumper.dump("getRecipients[" + recipType + "]=" + ret[recipType]);
+ }
+ return ret;
+}
+
+function getResentDate()
+{
+ var now = new Date();
+ var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
+ var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+
+ var now_string = days[now.getDay()] + ", " + now.getDate() + " " +
+ months[now.getMonth()] + " " + now.getFullYear() + " ";
+
+ var h = now.getHours();
+ if (h < 10) {
+ now_string += "0";
+ }
+ now_string += h + ":";
+ var m = now.getMinutes();
+ if (m < 10) {
+ now_string += "0";
+ }
+ now_string += m + ":";
+ var s = now.getSeconds();
+ if (s < 10) {
+ now_string += "0";
+ }
+ now_string += s + " ";
+
+ var tz = now.getTimezoneOffset();
+ if (tz > 0) {
+ now_string += "-";
+ } else {
+ now_string += "+";
+ tz *= -1;
+ }
+
+ var tzh = Math.floor(tz/60);
+ if (tzh < 10) {
+ now_string += "0";
+ }
+ now_string += tzh;
+ var tzm = tz % 60;
+ if (tzm < 10) {
+ now_string += "0";
+ }
+ now_string += tzm;
+
+ return now_string;
+}
+
+function getUserAgent()
+{
+ var useragent = "";
+ var pHTTPHandler = Cc["@mozilla.org/network/protocol;1?name=http"].
+ getService(Ci.nsIHttpProtocolHandler);
+
+ if (pHTTPHandler && pHTTPHandler.userAgent) {
+ useragent = pHTTPHandler.userAgent;
+ } else {
+ useragent = window.navigator.userAgent;
+ }
+
+ return useragent;
+}
+
+function getResentHeaders()
+{
+ let msgCompFields = gMsgCompose.compFields;
+ var resenthdrs = encodeMimeHeader("Resent-From: " + getSender() + "\r\n");
+ if (msgCompFields.to) {
+ resenthdrs += encodeMimeHeader("Resent-To: " + msgCompFields.to + "\r\n");
+ }
+ if (msgCompFields.cc) {
+ resenthdrs += encodeMimeHeader("Resent-CC: " + msgCompFields.cc + "\r\n");
+ }
+ if (!msgCompFields.to && !msgCompFields.cc) {
+ var composeMsgsBundle = document.getElementById("bundle_composeMsgs");
+ var undisclosedRecipients;
+ try {
+ undisclosedRecipients = composeMsgsBundle.getString("undisclosedRecipients");
+ } catch(ex) {
+ // Entity 12566 was renamed to undisclosedRecipients in TB30
+ undisclosedRecipients = composeMsgsBundle.getString("12566");
+ }
+ resenthdrs += encodeMimeHeader("Resent-To: " + undisclosedRecipients + ":;" + "\r\n");
+ }
+ resenthdrs += "Resent-Date: " + getResentDate() + "\r\n";
+ var msgID = Cc["@mozilla.org/messengercompose/computils;1"].
+ createInstance(Ci.nsIMsgCompUtils).
+ msgGenerateMessageId(gCurrentIdentity);
+ if (msgID) {
+ resenthdrs += "Resent-Message-ID: " + msgID + "\r\n";
+ }
+ var useragent = getUserAgent();
+ if (useragent) {
+ resenthdrs += "Resent-User-Agent: " + useragent + "\r\n";
+ }
+ // dumper.dump("resent-headers\n" + resenthdrs);
+ return resenthdrs;
+}
+
+var msgCompFields;
+var concurrentConnections;
+
+function RealBounceMessages()
+{
+ msgCompFields = gMsgCompose.compFields;
+ msgCompFields.from = getSender();
+ Recipients2CompFields(msgCompFields);
+
+ if (typeof gMsgCompose.expandMailingLists === "function") {
+ expandRecipients();
+ } else {
+ var recipientsStrings = getRecipients(true);
+ msgCompFields.to = recipientsStrings.resendTo;
+ msgCompFields.cc = recipientsStrings.resendCc;
+ msgCompFields.bcc = recipientsStrings.resendBcc;
+ }
+ // Check if e-mail addresses are complete, in case user turned off
+ // autocomplete to local domain.
+ if (!CheckValidEmailAddress(msgCompFields)) {
+ return;
+ }
+
+ var copyToSentMail = true;
+ try {
+ copyToSentMail = Services.prefs.getBoolPref("extensions.mailredirect.copyToSentMail");
+ } catch(ex) { }
+
+ if (!copyToSentMail) {
+ msgCompFields.fcc = "nocopy://";
+ msgCompFields.fcc2 = "nocopy://";
+ }
+
+ ToggleWindowLock(true);
+
+ window.msgSendListener = [];
+ window.msgStatusFeedback = [];
+ window.MeteorsStatus = new nsMeteorsStatus();
+
+ concurrentConnections = 5;
+ try {
+ concurrentConnections = Services.prefs.getIntPref("extensions.mailredirect.concurrentConnections");
+ } catch(ex) { }
+
+ if (concurrentConnections === 0) {
+ concurrentConnections = mstate.size;
+ }
+
+ // dumper.dump("concurrentConnections = " + concurrentConnections);
+
+ for (var i = 0; i < concurrentConnections; ++i) {
+ RealBounceMessage(i)
+ }
+ ToggleWindowLock(false);
+}
+
+function RealBounceMessage(idx)
+{
+ if (idx >= mstate.size) {
+ return;
+ }
+
+ var uri = mstate.selectedURIs[idx];
+ dumper.dump("RealBounceMessage(" + uri + ") [" + idx + "]");
+
+ window.msgSendListener[idx] = new nsMsgSendListener(idx);
+ window.msgStatusFeedback[idx] = new nsMsgStatusFeedback(idx);
+
+ var localfile = createTempFile();
+ if (localfile === null) {
+ // mstate.successfulSent[idx] = false;
+ dumper.dump("temp localfile for idx = " + idx + " is null.");
+ RealBounceMessage(idx+concurrentConnections);
+ return;
+ }
+
+ var messenger = Cc["@mozilla.org/messenger;1"].
+ createInstance(Ci.nsIMessenger);
+
+ var aScriptableInputStream = Cc["@mozilla.org/scriptableinputstream;1"].
+ createInstance(Ci.nsIScriptableInputStream);
+ var aFileOutputStream = Cc["@mozilla.org/network/file-output-stream;1"].
+ createInstance(Ci.nsIFileOutputStream);
+
+ var inHeader = true;
+ var skipping = false;
+ var leftovers = "";
+ var buf = "";
+ var line = "";
+
+ var aCopyListener = {
+ onStartRequest: function(aRequest, aContext) {
+ // write out Resent-* headers
+ var resenthdrs = getResentHeaders();
+ aFileOutputStream.write(resenthdrs, resenthdrs.length);
+ },
+
+ onStopRequest: function(aRequest, aContext, aStatusCode) {
+ // write leftovers
+ aFileOutputStream.write(leftovers, leftovers.length);
+ aFileOutputStream.close();
+
+ if (aStatusCode) {
+ // mstate.successfulSent[idx] = false;
+ dumper.dump("aCopyListener.onStopRequest(" + aRequest + ", " + aContext + ", " + aStatusCode + ")");
+ return;
+ }
+
+ // send a message
+ var msgSend = Cc["@mozilla.org/messengercompose/send;1"].
+ createInstance(Ci.nsIMsgSend);
+ mstate.msgSendObj[idx] = msgSend;
+
+ try {
+ msgSend.sendMessageFile(
+ gCurrentIdentity, // in nsIMsgIdentity aUserIdentity,
+ getCurrentAccountKey(), // char* accountKey,
+ msgCompFields, // in nsIMsgCompFields fields,
+ localfile, // in nsIFile sendIFile,
+ true, // in PRBool deleteSendFileOnCompletion,
+ false, // in PRBool digest_p,
+ msgSend.nsMsgDeliverNow, // in nsMsgDeliverMode mode,
+ null, // in nsIMsgDBHdr msgToReplace,
+ window.msgSendListener[idx], // in nsIMsgSendListener aListener,
+ window.msgStatusFeedback[idx], // in nsIMsgStatusFeedback aStatusFeedback,
+ null // in string password
+ );
+ } catch(ex) {
+ dumper.dump("unhandled exception when sending message:\n" + ex);
+ }
+
+ var msgSendReport = msgSend.sendReport;
+ if (msgSendReport) {
+ //var prompt = msgWindow.promptDialog;
+ //msgSendReport.displayReport(prompt, false /* showErrorOnly */, true /* dontShowReportTwice */);
+ } else {
+ /* If we come here it's because we got an error before we could intialize a
+ send report! */
+ dumper.dump("msgSendReport is null.");
+ }
+ // msgSend = null;
+ // dumper.dump("abc");
+ },
+
+ onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount) {
+ //dumper.dump("aCopyListener.onDataAvailable(" + aRequest + ", " + aContext + ", "+aInputStream + ", " + aOffset + ", " + aCount + ")");
+ aScriptableInputStream.init(aInputStream);
+
+ if (inHeader) {
+ //dumper.dump("!! inHeader reading new buffer, " + aCount + " bytes");
+ buf = leftovers + aScriptableInputStream.read(aCount);
+ leftovers = "";
+
+ while (buf.length > 0) {
+ // find end of line
+ var eol = -1;
+ var eol_length = -1;
+ var eol_r = buf.indexOf("\r");
+ var eol_n = buf.indexOf("\n");
+ if (eol_r !== -1 && eol_n !== -1) {
+ eol = eol_r < eol_n ? eol_r : eol_n;
+ } else if (eol_r !== -1) {
+ eol = eol_r;
+ } else if (eol_n !== -1) {
+ eol = eol_n;
+ }
+
+ if (eol === -1) {
+ // no end of line character in buffer
+ // remember this part for the next time
+ leftovers = buf;
+ // dumper.dump("leftovers=>>"+leftovers+"<<leftovers_end. length=" + leftovers.length);
+ break;
+ } else {
+ // eol character found. find optional pair (\r\n) (\n\r)
+ eol_length = 1;
+
+ // try a pair of eol chars
+ // dumper.dump("trying pair. eol="+eol);
+ if (eol + 1 < buf.length) {
+ if ((buf[eol] === "\r" && buf[eol+1] === "\n") ||
+ (buf[eol] === "\n" && buf[eol+1] === "\r")) {
+ ++eol;
+ ++eol_length;
+ // dumper.dump("pair found. eol="+eol);
+ }
+ } else {
+ // pair couldn't be found because of end of buffer
+ // dumper.dump("pair couldn't be found. end of buf. eol="+eol+" buf.length="+buf.length);
+ leftovers = buf;
+ break;
+ }
+ // terminate the line with CRLF sign, not native line-endings
+ line = buf.substr(0, eol+1-eol_length) + "\r\n";
+ buf = buf.substr(eol+1);
+ // dumper.dump("line=>>"+line+"<<line_end. length=" + line.length);
+
+ if (line === "\r\n") {
+ aFileOutputStream.write(line, line.length);
+ inHeader = false;
+ leftovers = buf;
+ break;
+ }
+ }
+
+ if (skipping) {
+ if (line[0] === " " || line[0] === "\t") {
+ // dumper.dump("forbidden line:" + line+"<<");
+ // continue;
+ } else {
+ skipping = false;
+ }
+ }
+
+ // remove sensitive headers (vide: nsMsgSendPart.cpp)
+ // From_ line format - http://www.qmail.org/man/man5/mbox.html
+ if (/^[>]*From \S+ /.test(line) ||
+ /^bcc: /i.test(line) ||
+ /^resent-bcc: /i.test(line) ||
+ /^fcc: /i.test(line) ||
+ /^content-length: /i.test(line) ||
+ /^lines: /i.test(line) ||
+ /^status: /i.test(line) ||
+ /^x-mozilla-status(?:2)?: /i.test(line) ||
+ /^x-mozilla-draft-info: /i.test(line) ||
+ /^x-mozilla-newshost: /i.test(line) ||
+ /^x-uidl: /i.test(line) ||
+ /^x-vm-\S+: /i.test(line) ||
+ /^return-path: /i.test(line) ||
+ /^delivered-to: /i.test(line) ||
+
+ // for drafts
+ /^FCC: /i.test(line) ||
+ /^x-identity-key: /i.test(line) ||
+ /^x-account-key: /i.test(line)) {
+ skipping = true;
+ // discard line
+ // dumper.dump("forbidden line:" + line+"<<");
+ }
+
+ if (!skipping) {
+ var ret = aFileOutputStream.write(line, line.length);
+ if (ret !== line.length) {
+ dumper.dump("!! inHeader write error? line len "+ line.length + ", written "+ ret);
+ }
+ }
+ }
+
+ if (!inHeader && leftovers !== "") {
+ // convert all possible line terminations to CRLF (required by RFC822)
+ leftovers = leftovers.replace(/\r\n|\n\r|\r|\n/g, "\r\n");
+ ret = aFileOutputStream.write(leftovers, leftovers.length);
+ if (ret != leftovers.length) {
+ dumper.dump("!! inBody write error? leftovers len " + leftovers.length + ", written " + ret);
+ }
+ leftovers = "";
+ }
+ } else {
+ // out of header -- read the rest and write to file
+ buf = leftovers + aScriptableInputStream.read(aCount);
+ leftovers = "";
+ // convert all possible line terminations to CRLF (required by RFC822)
+ buf = buf.replace(/\r\n|\n\r|\r|\n/g, "\r\n");
+ ret = aFileOutputStream.write(buf, buf.length);
+ if (ret != buf.length) {
+ dumper.dump("!! inBody write error? buf len " + buf.length + ", written " + ret);
+ }
+ buf = "";
+ }
+ }
+ };
+
+ var msgService = messenger.messageServiceFromURI(uri);
+
+ try {
+ aFileOutputStream.init(localfile, -1, parseInt("0600", 8), 0);
+ } catch(ex) {
+ dumper.dump("aFileOutputStream.init() failed:" + ex);
+ // mstate.successfulSent[idx] = false;
+ RealBounceMessage(idx+concurrentConnections);
+ return;
+ }
+
+ var newURI = {};
+
+ msgService.CopyMessage(
+ uri,
+ aCopyListener,
+ false, // aMoveMessage
+ null, // aUrlListener,
+ msgWindow, // msgWindow,
+ newURI);
+
+ // dumper.dump("newURI = " + newURI.value.spec);
+ newURI = null;
+}
+
+// We're going to implement our status feedback for the mail window in JS now.
+// the following contains the implementation of our status feedback object
+
+function nsMsgStatusFeedback(idx)
+{
+ // dumper.dump("nsMsgStatusFeedback(" + idx + ")");
+ this.URIidx = idx;
+ if (gAppInfoID === THUNDERBIRD_ID) {
+ this.throbber = document.getElementById("throbber-box");
+ } else if (gAppInfoID === SEAMONKEY_ID) {
+ this.throbber = document.getElementById("navigator-throbber");
+ }
+ if (gAppInfoPlatformVersion < 65) {
+ this.statusTextFld = document.getElementById("statusText-pre65");
+ this.statusBar = document.getElementById("bounce-progressmeter-pre65");
+ } else {
+ this.statusTextFld = document.getElementById("statusText");
+ this.statusBar = document.getElementById("bounce-progressmeter");
+ }
+ var treeChildren = document.getElementById("topTreeChildren");
+ if (treeChildren) {
+ var el = treeChildren.getElementsByAttribute("URIidx", this.URIidx);
+ if (el) {
+ if (!this.mailredirectTreeCell) {
+ this.mailredirectTreeCell = el[0].lastChild;
+ }
+ }
+ }
+}
+
+nsMsgStatusFeedback.prototype =
+{
+ // global variables for status / feedback information....
+ throbber: null,
+ statusTextFld: null,
+ statusBar: null,
+ mailredirectTreeCell: null,
+ URIidx: -1,
+
+ updateStatusText: function() {
+ // if all StatusStrings are equal show this string
+ // else don't change currently showing statusstring
+ var str = mstate.statusStrings[0];
+ for (var i = 1; i < mstate.size; ++i) {
+ if (str !== mstate.statusStrings[i]) {
+ return;
+ }
+ }
+ // dumper.dump("setting status text to: " + str);
+ this.statusTextFld.label = str;
+ },
+
+ QueryInterface: function(iid) {
+ // dumper.dump("nsMsgStatusFeedback.QueryInterface " + iid);
+ if (iid.equals(Ci.nsIMsgStatusFeedback) ||
+ // iid.equals(Ci.nsIProgressEventSink) ||
+ iid.equals(Ci.nsIWebProgressListener) ||
+ iid.equals(Ci.nsISupportsWeakReference) ||
+ iid.equals(Ci.nsISupports)) {
+ return this;
+ }
+ throw Components.results.NS_NOINTERFACE;
+ },
+
+ // nsIMsgStatusFeedback implementation.
+ showStatusString: function(aStatusText) {
+ // dumper.dump("[" + this.URIidx + "] " + " showStatusString(" + aStatusText + ")");
+ mstate.statusStrings[this.URIidx] = aStatusText;
+ this.updateStatusText();
+ },
+
+ startMeteors: function() {
+ dumper.dump("[" + this.URIidx + "] " + "startMeteors()");
+ mstate.statusStrings[this.URIidx] = "";
+ mstate.sendOperationInProgress[this.URIidx] = true;
+
+ window.MeteorsStatus.pendingStartRequests++;
+ // if we don't already have a start meteor timeout pending
+ // and the meteors aren't spinning, then kick off a start
+ if (!window.MeteorsStatus.startTimeoutID && !window.MeteorsStatus.meteorsSpinning) {
+ window.MeteorsStatus.startTimeoutID = setTimeout(function() { window.MeteorsStatus._startMeteors() }, 0);
+ dumper.dump("[" + this.URIidx + "] " + "window.MeteorsStatus.startTimeoutID=" + window.MeteorsStatus.startTimeoutID);
+ }
+
+ // since we are going to start up the throbber no sense in processing
+ // a stop timeout...
+ if (window.MeteorsStatus.stopTimeoutID) {
+ clearTimeout(window.MeteorsStatus.stopTimeoutID);
+ window.MeteorsStatus.stopTimeoutID = null;
+ }
+ },
+
+ stopMeteors: function() {
+ dumper.dump("[" + this.URIidx + "] " + "stopMeteors()");
+ if (mstate) {
+ mstate.sendOperationInProgress[this.URIidx] = false;
+ }
+
+ if (this.URIidx+concurrentConnections < mstate.size) {
+ RealBounceMessage(this.URIidx+concurrentConnections);
+ }
+
+ if (window.MeteorsStatus.pendingStartRequests > 0) {
+ window.MeteorsStatus.pendingStartRequests--;
+ }
+ // if we are going to be starting the meteors, cancel the start
+ if (window.MeteorsStatus.pendingStartRequests === 0 && window.MeteorsStatus.startTimeoutID) {
+ clearTimeout(window.MeteorsStatus.startTimeoutID);
+ window.MeteorsStatus.startTimeoutID = null;
+ }
+
+ // if we have no more pending starts and we don't have a stop timeout already in progress
+ // AND the meteors are currently running then fire a stop timeout to shut them down.
+ if (window.MeteorsStatus.pendingStartRequests === 0 && !window.MeteorsStatus.stopTimeoutID) {
+ window.MeteorsStatus.stopTimeoutID = setTimeout(function() { window.MeteorsStatus._stopMeteors() }, 0);
+ dumper.dump("[" + this.URIidx + "] " + "window.MeteorsStatus.stopTimeoutID=" + window.MeteorsStatus.stopTimeoutID);
+ }
+ },
+
+ showProgress: function(percentage) {
+ dumper.dump("[" + this.URIidx + "] " + "showProgress(" + percentage +")");
+ if (percentage >= 0) {
+ this.statusBar.setAttribute("mode", "normal");
+ this.statusBar.value = percentage;
+ this.statusBar.label = Math.round(percentage) + "%";
+ }
+ },
+
+ closeWindow: function(percent) {
+ // dumper.dump("[" + this.URIidx + "] " + "closeWindow(" + percent +")");
+ },
+
+ // nsIProgressEventSink implementation
+ /*
+ onProgress: function(aRequest, aContext, aProgress, aProgressMax) {
+ dumper.dump("statusFeedback.onProgress(" + aRequest + ", " + aContext + ", " + aProgress + ", " + aProgressMax);
+ },
+ onStatus: function(aRequest, aContext, aStatus, aStatusArg) {
+ dumper.dump("statusFeedback.onStatus(" + aRequest + ", " + aContext + ", " + aStatus + ", " + aStatusArg);
+ }
+ */
+
+ // all progress notifications are done through the nsIWebProgressListener implementation...
+ onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+ // dumper.dump("[" + this.URIidx + "] " + ". onStateChange(" + aWebProgress + ", " + aRequest + ", " + aStateFlags + ", " + aStatus + ")");
+ if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
+ // dumper.dump("onStateChange STATE_START");
+ mstate.sendOperationInProgress[this.URIidx] = true;
+ this.mailredirectTreeCell.setAttribute("mode", "undetermined");
+ this.statusBar.setAttribute("mode", "undetermined");
+ }
+
+ if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
+ // dumper.dump("onStateChange STATE_STOP");
+ mstate.sendOperationInProgress[this.URIidx] = false;
+ this.statusBar.setAttribute("mode", "normal");
+ this.statusBar.setAttribute("value", 0);
+ this.mailredirectTreeCell.removeAttribute("mode");
+ this.mailredirectTreeCell.removeAttribute("value");
+ this.statusTextFld.setAttribute("label", "");
+ }
+ },
+
+ onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {
+ // dumper.dump("[" + this.URIidx + "] " + ". onProgressChange(" + aWebProgress + ", " + aRequest.name + ", " + aCurSelfProgress + ", " + aMaxSelfProgress + ", " + aCurTotalProgress + ", " + aMaxTotalProgress + ")");
+
+ if (aMaxTotalProgress > 0) {
+ var percent = (aCurTotalProgress*100)/aMaxTotalProgress;
+ if (percent > 100) {
+ percent = 100;
+ }
+ mstate.selectedURIsProgress[this.URIidx] = percent;
+
+ // dumper.dump("[" + this.URIidx + "] " + ". onProgressChange = " + percent);
+ percent = Math.round(percent);
+
+ // this.statusBar.removeAttribute("mode");
+
+ // Advance progress meter.
+ this.mailredirectTreeCell.setAttribute("value", percent);
+ this.updateStatusBar();
+ } else {
+ // Progress meter should be barber-pole in this case.
+ this.statusBar.setAttribute("mode", "undetermined");
+ this.mailredirectTreeCell.removeAttribute("mode");
+ }
+ },
+
+ onLocationChange: function(aWebProgress, aRequest, aLocation) {
+ // dumper.dump("[" + this.URIidx + "] " + "onLocationChange(" + aWebProgress + ", " + aRequest + ", " + aLocation + ")");
+ },
+
+ onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
+ // dumper.dump("[" + this.URIidx + "] " + "onStatusChange(" + aWebProgress + ", " + aRequest + ", " + aStatus + ", " + aMessage + ")");
+ // Looks like it's possible that we get call while the document has been already delete!
+ // therefore we need to protect ourself by using try/catch
+ try {
+ this.showStatusString(aMessage);
+ } catch (ex) { };
+ },
+
+ onSecurityChange: function(aWebProgress, aRequest, state) { },
+
+ updateStatusBar: function() {
+ var sum = 0;
+ for (var i = 0; i < mstate.size; sum += mstate.selectedURIsProgress[i++]) { }
+ var percent = Math.round(sum / mstate.size);
+ if (percent > 100) {
+ percent = 100;
+ }
+
+ this.statusBar.setAttribute("value", percent);
+ dumper.dump("updateStatusBar = " + percent);
+ }
+};
+
+function nsMeteorsStatus()
+{
+ dumper.dump("nsMeteorsStatus");
+ if (gAppInfoID === THUNDERBIRD_ID) {
+ this.throbber = document.getElementById("throbber-box");
+ } else if (gAppInfoID === SEAMONKEY_ID) {
+ this.throbber = document.getElementById("navigator-throbber");
+ }
+ if (gAppInfoPlatformVersion < 65) {
+ this.statusTextFld = document.getElementById("statusText-pre65");
+ this.statusBar = document.getElementById("bounce-progressmeter-pre65");
+ this.progressBarContainer = document.getElementById("bounce-progressmeter-pre65");
+ } else {
+ this.statusTextFld = document.getElementById("statusText");
+ this.statusBar = document.getElementById("bounce-progressmeter");
+ this.progressBarContainer = document.getElementById("statusbar-progresspanel");
+ }
+}
+
+nsMeteorsStatus.prototype =
+{
+ pendingStartRequests: 0,
+ startTimeoutID: null,
+ stopTimeoutID: null,
+ meteorsSpinning: false,
+ throbber: null,
+ statusTextFld: null,
+ statusBar: null,
+ progressBarContainer: null,
+
+ _startMeteors: function() {
+ dumper.dump("_startMeteors");
+
+ this.meteorsSpinning = true;
+ this.startTimeoutID = null;
+
+ // Turn progress meter on.
+ if (this.statusBar) {
+ this.statusBar.setAttribute("mode", "undetermined");
+ this.progressBarContainer.removeAttribute("collapsed");
+ }
+
+ // start the throbber
+ if (this.throbber) {
+ this.throbber.setAttribute("busy", true);
+ }
+ },
+
+ _stopMeteors: function() {
+ dumper.dump("_stopMeteors");
+
+ var BounceMsgsBundle = document.getElementById("bundle_mailredirect");
+
+ // if all mails successfully
+ var success = true;
+ for (var i = 0; success && i < mstate.size; ++i) {
+ success &= mstate.successfulSent[i];
+ }
+
+ dumper.dump("_stopMeteors: successfully sent all messages? " + success);
+
+ let numMessages = mstate.size;
+ let pluralRule = BounceMsgsBundle.getString("pluralRule");
+ let [get, numForms] = PluralForm.makeGetter(pluralRule);
+ var msg;
+ if (success) {
+ msg = get(numMessages, BounceMsgsBundle.getString("sendMessageSuccessfulMsgs"));
+ } else {
+ msg = get(numMessages, BounceMsgsBundle.getString("sendMessageFailedMsgs"));
+ }
+ this.statusTextFld.label = msg;
+
+ // stop the throbber
+ if (this.throbber) {
+ this.throbber.setAttribute("busy", false);
+ }
+
+ // Turn progress meter off.
+ if (this.statusBar) {
+ this.progressBarContainer.setAttribute("collapsed", "true");
+ this.statusBar.setAttribute("mode", "normal");
+ this.statusBar.value = 0; // be sure to clear the progress bar
+ this.statusBar.label = "";
+ }
+
+ this.meteorsSpinning = false;
+ this.stopTimeoutID = null;
+
+ if (success) {
+ goDoCommand("cmd_mailredirect_close");
+ } else {
+ var treeChildren = document.getElementById("topTreeChildren");
+ if (treeChildren) {
+ var el = treeChildren.getElementsByAttribute("mode", "normal");
+ for (var i = 0; i < el.length; ++i) {
+ try {
+ el.removeAttribute("mode");
+ } catch(ex) { }
+ }
+ }
+ }
+ }
+};
+
+function nsMsgSendListener(idx)
+{
+ this.URIidx = idx;
+}
+
+nsMsgSendListener.prototype =
+{
+ URIidx: -1,
+ mailredirectTreeRow: null,
+ mailredirectTreeCell: null,
+
+ ensureStatusFields: function() {
+ // dumper.dump("msgSendListener.ensureStatusFields");
+ if (!this.mailredirectTreeRow || !this.mailredirectTreeCell) {
+ var treeChildren = document.getElementById("topTreeChildren");
+ if (treeChildren) {
+ var el = treeChildren.getElementsByAttribute("URIidx", this.URIidx);
+ if (el) {
+ if (!this.mailredirectTreeRow) {
+ this.mailredirectTreeRow = el[0];
+ }
+ if (!this.mailredirectTreeCell) {
+ this.mailredirectTreeCell = el[0].lastChild;
+ }
+ }
+ }
+ }
+ },
+
+ QueryInterface: function(iid) {
+ // dumper.dump("nsMsgSendListener.QueryInterface " + iid);
+ if (iid.equals(Ci.nsIMsgSendListener) ||
+ iid.equals(Ci.nsIMsgCopyServiceListener) ||
+ iid.equals(Ci.nsISupports)) {
+ return this;
+ }
+ throw Components.results.NS_NOINTERFACE;
+ },
+
+ // nsIMsgSendListener
+ onStartSending: function(aMsgID, aMsgSize) {
+ // dumper.dump("[" + this.URIidx + "] " + "msgSendListener.onStartSending(" + aMsgID + ", " + aMsgSize + ")");
+ },
+
+ onProgress: function(aMsgID, aProgress, aProgressMax) {
+ // dumper.dump("[" + this.URIidx + "] " + "msgSendListener.onProgress(" + aMsgID + ", " + aProgress + ", " + aProgressMax + ")");
+ },
+
+ onStatus: function(aMsgID, aMsg) {
+ // dumper.dump("[" + this.URIidx + "] " + "msgSendListener.onStatus("+aMsgID+", "+aMsg + ")");
+ },
+
+ onStopSending: function(aMsgID, aStatus, aMsg, returnFileSpec) {
+ // dumper.dump("[" + this.URIidx + "] " + "msgSendListener.onStopSending("+aMsgID+", "+aStatus +", "+aMsg+", "+returnFileSpec + ")");
+ this.ensureStatusFields();
+ mstate.selectedURIsProgress[this.URIidx] = 100;
+ if (aStatus) {
+ this.mailredirectTreeCell.removeAttribute("mode");
+ // mstate.successfulSent[this.URIidx] = false;
+ this.mailredirectTreeRow.setAttribute("properties", "notsent");
+ for (var i = 0; i < this.mailredirectTreeRow.childNodes.length; ++i) {
+ var child = this.mailredirectTreeRow.childNodes[i];
+ if (child.hasAttribute("properties")) {
+ var prop = child.getAttribute("properties");
+ child.setAttribute("properties", prop + " notsent");
+ } else {
+ child.setAttribute("properties", "notsent");
+ }
+ }
+ } else {
+ this.mailredirectTreeCell.setAttribute("value", "100");
+ mstate.successfulSent[this.URIidx] = true;
+
+ // mark message as 'redirected'
+ var messenger = Cc["@mozilla.org/messenger;1"].
+ createInstance(Ci.nsIMessenger);
+ var msgService = messenger.messageServiceFromURI(mstate.selectedURIs[this.URIidx]);
+ var msgHdr = msgService.messageURIToMsgHdr(mstate.selectedURIs[this.URIidx]);
+ /*
+ * redirected status bug
+ *
+ * var keywords = msgHdr.getStringProperty("keywords");
+ if (keywords.length !== 0) {
+ if (! /(?:^| )redirected(?: |$)/.test(keywords)) {
+ keywords += " redirected";
+ }
+ } else {
+ keywords = "redirected";
+ }
+ msgHdr.setStringProperty("keywords", keywords);
+ var msgDb = msgHdr.folder.msgDatabase;
+ msgDb.Commit(1); // msgDb.Commit(MSG_DB_LARGE_COMMIT);
+ */
+
+ var msg = Cc["@mozilla.org/array;1"].
+ createInstance(Ci.nsIMutableArray);
+ msg.appendElement(msgHdr, false);
+ try {
+ msgHdr.folder.addKeywordsToMessages(msg, "redirected");
+ } catch(e) {
+ dumper.dump(e);
+ }
+ /* End of bugfix */
+
+ }
+ },
+
+ onGetDraftFolderURI: function(aFolderURI) {
+ // dumper.dump("[" + this.URIidx + "] " + "msgSendListener.onGetDraftFolderURI("+aFolderURI +")");
+ },
+
+ onSendNotPerformed: function(aMsgID, aStatus) {
+ // dumper.dump("[" + this.URIidx + "] " + "msgSendListener.onSendNotPerformed("+aMsgID+", "+aStatus +")");
+ },
+
+ // nsIMsgCopyServiceListener
+ OnStartCopy: function() {
+ // dumper.dump("[" + this.URIidx + "] " + "(msgCopyServiceListener) msgSendListener.OnStartCopy()");
+ },
+
+ OnProgress: function(aProgress, aProgressMax) {
+ // dumper.dump("[" + this.URIidx + "] " + "(msgCopyServiceListener) msgSendListener.OnProgress(" + aProgress + ", " + aProgressMax + ")");
+ },
+
+ SetMessageKey: function(aKey) {
+ // dumper.dump("[" + this.URIidx + "] " + "(msgCopyServiceListener) msgSendListener.SetMessageKey(" + aKey + ")");
+ },
+
+ SetMessageId: function(aMessageId) {
+ // dumper.dump("[" + this.URIidx + "] " + "(msgCopyServiceListener) msgSendListener.SetMessageId(" + aMessageId +")");
+ },
+
+ OnStopCopy: function(aStatus) {
+ dumper.dump("[" + this.URIidx + "] " + "(msgCopyServiceListener) msgSendListener.OnStopCopy(" + aStatus + ")");
+ /*
+ if (aStatus) {
+ // mstate.successfulSent[this.URIidx] = false;
+ } else {
+ mstate.selectedURIsProgress[this.URIidx] = 100;
+ }
+ */
+ }
+};
+
+var MailredirectWindowController = {
+ supportsCommand: function(command) {
+ // dumper.dump("supportsCommand(" + command + ")");
+ switch(command) {
+ case "cmd_mailredirect_now":
+ case "cmd_mailredirect_withcheck":
+ case "cmd_mailredirect_close":
+ case "cmd_mailredirect_delete":
+ return true;
+ default:
+ return false;
+ }
+ },
+
+ isCommandEnabled: function(command) {
+ switch(command) {
+ case "cmd_mailredirect_now":
+ case "cmd_mailredirect_withcheck":
+ return ((!Services.io.offline) && (mstate.selectedURIs !== null)) && !gSendLocked;
+ case "cmd_mailredirect_close":
+ return true;
+ case "cmd_mailredirect_delete":
+ var tree = document.getElementById("bounceTree");
+ var treeChildren = document.getElementById("topTreeChildren");
+ return tree && !treeChildren.disabled && tree.view.selection.getRangeCount();
+ default:
+ return false;
+ }
+ },
+
+ doCommand: function(command) {
+ // dumper.dump("doCommand(" + command + ")");
+
+ // if the user invoked a key short cut then it is possible that we got here for a command which is
+ // really disabled. kick out if the command should be disabled.
+ if (!this.isCommandEnabled(command)) {
+ return;
+ }
+
+ switch(command) {
+ case "cmd_mailredirect_now":
+ DoForwardBounce();
+ break;
+ case "cmd_mailredirect_withcheck":
+ DoForwardBounceWithCheck();
+ break;
+ case "cmd_mailredirect_close":
+ DoCommandClose();
+ break;
+ case "cmd_mailredirect_delete":
+ var start = {}, end = {};
+ var tree = document.getElementById("bounceTree");
+ var treeChildren = document.getElementById("topTreeChildren");
+ var numRanges = tree.view.selection.getRangeCount();
+ for (var t = numRanges; t > 0; t--) {
+ tree.view.selection.getRangeAt(t-1, start, end);
+ for (var v = end.value; v >= start.value; v--) {
+ mstate.selectedURIs.splice(v, 1);
+ mstate.size--;
+ var treerows = treeChildren.getElementsByAttribute("URIidx", v);
+ var treeitem = treerows[0].parentNode;
+ treeitem.parentNode.removeChild(treeitem);
+ }
+ }
+ if (treeChildren.hasChildNodes) {
+ var treerows = treeChildren.childNodes;
+ for (var i = 0; i < treerows.length; i++) {
+ treerows[i].firstChild.setAttribute("URIidx", i);
+ }
+ }
+ }
+ },
+
+ onEvent: function(event) {
+ // dumper.dump("onEvent(" + event + ")");
+ }
+};
+
+function RemoveDupAddresses()
+{
+ for (var recipType in mailredirectRecipients) {
+ var array = [];
+ for (var i in mailredirectRecipients[recipType]) {
+ var recipient = mailredirectRecipients[recipType][i];
+ var found = false;
+ for (var j = 0; j < i; ++j) {
+ if (recipient.fullname.toLowerCase() === mailredirectRecipients[recipType][j].fullname.toLowerCase()) {
+ // dumper.dump("found duplicate \"" + recipient.fullname + "\" at positions " + i + " and " + j);
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ array.push(recipient);
+ }
+ }
+ mailredirectRecipients[recipType] = array;
+ }
+}
+
+function WhichElementHasFocus()
+{
+ var msgIdentityElement = document.getElementById("msgIdentity");
+ var msgAddressingWidgetTreeElement = document.getElementById("addressingWidget");
+
+ var currentNode = top.document.commandDispatcher.focusedElement;
+ while (currentNode) {
+ if (currentNode === msgIdentityElement ||
+ currentNode === msgAddressingWidgetTreeElement) {
+ return currentNode;
+ }
+
+ currentNode = currentNode.parentNode;
+ }
+
+ return null;
+}
+
+// Function that performs the logic of switching focus from
+// one element to another in the mail compose window.
+// The default element to switch to when going in either
+// direction (shift or no shift key pressed), is the
+// AddressingWidgetTreeElement.
+//
+// The only exception is when the MsgHeadersToolbar is
+// collapsed, then the focus will always be on the body of
+// the message.
+function SwitchElementFocus(event)
+{
+ if (!event) {
+ return;
+ }
+
+ var focusedElement = WhichElementHasFocus();
+ var msgIdentityElement = document.getElementById("msgIdentity");
+ var addressingWidget = document.getElementById("addressingWidget");
+ var bounceTree = document.getElementById("bounceTree");
+
+ if (event.shiftKey) {
+ if (focusedElement === msgIdentityElement) {
+ bounceTree.focus();
+ } else if (focusedElement === addressingWidget) {
+ msgIdentityElement.focus();
+ } else {
+ var element = document.getElementById("addressCol2#" + awGetNumberOfRecipients());
+ awSetFocus(awGetNumberOfRecipients(), element);
+ }
+ } else {
+ if (focusedElement === msgIdentityElement) {
+ var element = document.getElementById("addressCol2#" + awGetNumberOfRecipients());
+ awSetFocus(awGetNumberOfRecipients(), element);
+ } else if (focusedElement === addressingWidget) {
+ bounceTree.focus();
+ } else {
+ msgIdentityElement.focus();
+ }
+ }
+}
+
+function sidebarCloseButtonOnCommand() {
+ toggleAddressPicker();
+}
+
+function toggleAddressPicker()
+{
+ var sidebarBox = document.getElementById("sidebar-box");
+ var sidebarSplitter = document.getElementById("sidebar-splitter");
+ var el = document.getElementById("viewAddressPicker");
+ if (sidebarBox.hidden) {
+ sidebarBox.hidden = false;
+ sidebarSplitter.hidden = false;
+ el.setAttribute("checked","true");
+
+ var sidebar = document.getElementById("sidebar");
+ var sidebarUrl = sidebar.getAttribute("src");
+ // if we have yet to initialize the src url on the sidebar than go ahead and do so now...
+ // we do this lazily here, so we don't spend time when bringing up the compose window loading the address book
+ // data sources. Only when the user opens the address picker do we set the src url for the sidebar...
+ if (sidebarUrl === "") {
+ if (gAppInfoID === THUNDERBIRD_ID) {
+ // CardBook contact sidebar
+ if (getPref("extensions.cardbook.autocompletion", false) === true) {
+ sidebar.setAttribute("src", "chrome://cardbook/content/contactsSidebar/wdw_cardbookContactsSidebar.xul");
+ } else {
+ sidebar.setAttribute("src", "chrome://messenger/content/addressbook/abContactsPanel.xul");
+ }
+ } else if (gAppInfoID === SEAMONKEY_ID) {
+ sidebar.setAttribute("src", "chrome://messenger/content/addressbook/addressbook-panel.xul");
+ }
+ setTimeout(function() { renameToToResendTo() }, 100);
+ }
+
+ sidebarBox.setAttribute("sidebarVisible", "true");
+ } else {
+ sidebarBox.hidden = true;
+ sidebarSplitter.hidden = true;
+ sidebarBox.setAttribute("sidebarVisible", "false");
+ el.removeAttribute("checked");
+ }
+}
+
+// public method called by add-ons.
+function AddRecipient(recipientType, address)
+{
+ awAddRecipient(recipientType, address);
+}
+
+// public method called by the contacts sidebar.
+function AddRecipientsArray(aRecipientType, aAddressArray)
+{
+ awAddRecipientsArray(aRecipientType, aAddressArray);
+}
+
+function renameToToResendTo()
+{
+ var el = document.getElementById("sidebar");
+ if (el === null) {
+ setTimeout(function() { renameToToResendTo() }, 100);
+ } else {
+ var BounceMsgsBundle = document.getElementById("bundle_mailredirect");
+ if (gAppInfoID === THUNDERBIRD_ID) {
+ var cardProperties = el.contentDocument.getElementById("cardProperties");
+ if (cardProperties === null) {
+ setTimeout(function() { renameToToResendTo() }, 100);
+ } else {
+ var offset = 0;
+ // Add-on sniffing by checking for id that is used by CardBook
+ var menuitem = el.contentDocument.getElementById("replytoEmail");
+ if (menuitem !== null) {
+ menuitem.setAttribute("hidden", true);
+ menuitem = el.contentDocument.getElementById("replytoButton");
+ menuitem.setAttribute("hidden", true);
+ } else {
+ // In bug 236240 the position of Delete and Properties items has changed, so also those of To, Cc, and Bcc
+ if (gAppInfoPlatformVersion < 50) {
+ offset = 2;
+ }
+ }
+ var menuitems = cardProperties.getElementsByTagName("menuitem");
+ menuitems.item(offset).setAttribute("label", BounceMsgsBundle.getString("resendToContextMenuLabelTB"));
+ menuitems.item(offset).setAttribute("accesskey", BounceMsgsBundle.getString("resendToContextMenuAccesskeyTB"));
+ menuitems.item(offset).setAttribute("oncommand", "addSelectedAddresses(\"addr_to\");");
+ menuitems.item(offset+1).setAttribute("label", BounceMsgsBundle.getString("resendCcContextMenuLabelTB"));
+ menuitems.item(offset+1).setAttribute("accesskey", BounceMsgsBundle.getString("resendCcContextMenuAccesskeyTB"));
+ menuitems.item(offset+1).setAttribute("oncommand", "addSelectedAddresses(\"addr_cc\");");
+ menuitems.item(offset+2).setAttribute("label", BounceMsgsBundle.getString("resendBccContextMenuLabelTB"));
+ menuitems.item(offset+2).setAttribute("accesskey", BounceMsgsBundle.getString("resendBccContextMenuAccesskeyTB"));
+ menuitems.item(offset+2).setAttribute("oncommand", "addSelectedAddresses(\"addr_bcc\");");
+
+ var button = el.contentDocument.getElementById("toButton");
+ button.setAttribute("label", BounceMsgsBundle.getString("resendToButtonLabel"));
+ button.setAttribute("accesskey", BounceMsgsBundle.getString("resendToButtonAccesskey"));
+ button.setAttribute("oncommand", "addSelectedAddresses(\"addr_to\");");
+ button = el.contentDocument.getElementById("ccButton");
+ button.setAttribute("label", BounceMsgsBundle.getString("resendCcButtonLabel"));
+ button.setAttribute("accesskey", BounceMsgsBundle.getString("resendCcButtonAccesskey"));
+ button.setAttribute("oncommand", "addSelectedAddresses(\"addr_cc\");");
+ button = el.contentDocument.getElementById("bccButton");
+ button.setAttribute("label", BounceMsgsBundle.getString("resendBccButtonLabel"));
+ button.setAttribute("crop", "center");
+ button.setAttribute("accesskey", BounceMsgsBundle.getString("resendBccButtonAccesskey"));
+ button.setAttribute("oncommand", "addSelectedAddresses(\"addr_bcc\");");
+
+ // Move bccButton down
+ if (false) {
+ var spacer = button.previousSibling;
+ spacer.parentNode.removeChild(spacer);
+ var hboxCc = button.parentNode;
+ var hboxBcc = document.createElement("hbox");
+ hboxBcc.appendChild(document.createElement("spring"));
+ hboxBcc.childNodes[0].setAttribute("flex", 1);
+ hboxBcc.appendChild(button);
+ hboxBcc.appendChild(document.createElement("spring"));
+ hboxBcc.childNodes[2].setAttribute("flex", 1);
+ hboxCc.parentNode.insertBefore(hboxBcc, hboxCc.nextSibling);
+ }
+ }
+ } else if (gAppInfoID === SEAMONKEY_ID) {
+ var popup = el.contentDocument.getElementById("composeMail");
+ if (popup === null) {
+ setTimeout(function() { renameToToResendTo() }, 100);
+ } else {
+ parent.document.documentElement.setAttribute("windowtype", "msgcompose"); // Make AbPanelLoad believe this is a msgcompose window so it displays the right menuitems
+ popup.childNodes[0].setAttribute("label", BounceMsgsBundle.getString("resendToContextMenuLabelSM"));
+ popup.childNodes[0].setAttribute("accesskey", BounceMsgsBundle.getString("resendToContextMenuAccesskeySM"));
+ popup.childNodes[0].setAttribute("oncommand", "AbPanelAdd(\"addr_to\");");
+ popup.childNodes[1].setAttribute("label", BounceMsgsBundle.getString("resendCcContextMenuLabelSM"));
+ popup.childNodes[1].setAttribute("accesskey", BounceMsgsBundle.getString("resendCcContextMenuAccesskeySM"));
+ popup.childNodes[1].setAttribute("oncommand", "AbPanelAdd(\"addr_cc\");");
+ popup.childNodes[2].setAttribute("label", BounceMsgsBundle.getString("resendBccContextMenuLabelSM"));
+ popup.childNodes[2].setAttribute("accesskey", BounceMsgsBundle.getString("resendBccContextMenuAccesskeySM"));
+ popup.childNodes[2].setAttribute("oncommand", "AbPanelAdd(\"addr_bcc\");");
+ for (var i = 0; i < 4; i++) {
+ popup.childNodes[i].hidden = false;
+ }
+ popup.childNodes[4].hidden = true;
+ }
+ }
+ }
+}
+
+/*
+ * maillists
+ *
+ * ported from https://dxr.mozilla.org/comm-esr24/source/mailnews/compose/src/nsMsgCompose.cpp#4694
+ * (nsMsgCompose::CheckAndPopulateRecipients)
+ */
+
+/* Only called in TB < 29 */
+function ResolveMailLists()
+{
+ var stillNeedToSearch = true;
+ var abDirectory;
+ var existingCard;
+ var mailListAddresses;
+ var mailListArray;
+ var addrbookDirArray = GetABDirectories();
+ var nbrAddressbook = addrbookDirArray.length;
+
+ let msgCompFields = gMsgCompose.compFields;
+
+ for (var k = 0; k < nbrAddressbook && stillNeedToSearch; ++k) {
+ // Avoid recursive mailing lists
+ if (abDirectory && (addrbookDirArray[k] === abDirectory)) {
+ stillNeedToSearch = false;
+ break;
+ }
+ abDirectory = addrbookDirArray[k].QueryInterface(Ci.nsIAbDirectory);
+ if (!abDirectory.supportsMailingLists) {
+ continue;
+ }
+
+ // Skip unopened Ubuntuone Address Books
+ if (Ci.nsIAbEDSDirectory && (abDirectory instanceof Ci.nsIAbEDSDirectory) &&
+ abDirectory.QueryInterface(Ci.nsIAbEDSDirectory) && !abDirectory._open) {
+ continue;
+ }
+
+ // Collect all mailing lists defined in this address book
+ mailListArray = BuildMailListArray(abDirectory);
+
+ for (var recipType in mailredirectRecipients) {
+ for (var j = 0; j < mailredirectRecipients[recipType].length; ++j) {
+ var recipient = mailredirectRecipients[recipType][j];
+ recipient.mProcessed = false;
+ }
+ }
+
+ stillNeedToSearch = false;
+ for (var recipType in mailredirectRecipients) {
+ // Note: We check this each time to allow for length changes.
+ for (var j = 0; j < mailredirectRecipients[recipType].length; ++j) {
+ var recipient = mailredirectRecipients[recipType][j];
+ if (!recipient.mProcessed) {
+ // First check if it's a mailing list
+ var mailListAddresses = GetMailListAddresses(recipient.fullname, mailListArray);
+ if (mailListAddresses) {
+ // Always populate
+ for (var nbrAddresses = mailListAddresses.length; nbrAddresses > 0; nbrAddresses--) {
+ existingCard = mailListAddresses.queryElementAt(nbrAddresses - 1, Ci.nsIAbCard);
+
+ var newRecipient;
+ var bIsMailList = existingCard.isMailList;
+ var pDisplayName = existingCard.displayName;
+
+ var email;
+ if (bIsMailList) {
+ email = existingCard.notes;
+ } else {
+ email = existingCard.primaryEmail;
+ }
+ var mAddress;
+ // makeFullAddress was changed to makeMimeHeader in Thunderbird 29 (bug 842632)
+ if (typeof MailServices.headerParser.makeMimeHeader === "function") {
+ mAddress = MailServices.headerParser.makeMimeHeader([{name: existingCard.displayName, email: email}], 1);
+ } else {
+ mAddress = MailServices.headerParser.makeFullAddress(existingCard.displayName, email);
+ }
+ if (!mAddress) {
+ // Oops, parser problem! I will try to do my best...
+ mAddress = pDisplayName + " <";
+ if (bIsMailList) {
+ if (email) {
+ mAddress += email;
+ } else {
+ mAddress += pDisplayName;
+ }
+ } else {
+ mAddress += email;
+ }
+ mAddress += ">";
+ }
+
+ if (!mAddress) {
+ continue;
+ }
+
+ // Now we need to insert the new address into the list of recipient
+ if (bIsMailList) {
+ stillNeedToSearch = true;
+ } else {
+ var newRecipient = { email: email, name: pDisplayName, fullname: mAddress };
+ newRecipient.mProcessed = true;
+ }
+ mailredirectRecipients[recipType].splice(j + 1, 0, newRecipient);
+ }
+ mailredirectRecipients[recipType].splice(j, 1);
+ --j;
+ continue;
+ }
+
+ if (!abDirectory) {
+ stillNeedToSearch = true;
+ continue;
+ }
+
+ // find a card that contains this e-mail address
+ existingCard = null
+ // Try/catch because cardForEmailAddress will throw if not implemented.
+ try {
+ existingCard = abDirectory.cardForEmailAddress(recipient.email);
+ } catch (e) { }
+
+ if (existingCard) {
+ recipient.mProcessed = true;
+ if (!abDirectory.readOnly) {
+ var popularityValue = existingCard.getProperty("PopularityIndex", "0");
+ var popularityIndex = parseInt(popularityValue);
+
+ if (isNaN(popularityIndex)) {
+ // TB 2 wrote the popularity value as hex, so if we get here,
+ // then we've probably got a hex value. We'll convert it back
+ // to decimal, as that's the best we can do.
+ popularityIndex = parseInt(popularityValue, 16);
+
+ // If its still NaN, just give up, we shouldn't ever get here.
+ if (isNaN(popularityIndex)) {
+ popularityIndex = 0;
+ }
+ }
+
+ existingCard.setProperty("PopularityIndex", ++popularityIndex);
+ try {
+ abDirectory.modifyCard(existingCard);
+ }
+ catch(ex) {
+ Components.utils.reportError(ex);
+ }
+ }
+ } else {
+ stillNeedToSearch = true;
+ }
+ }
+ }
+ }
+ }
+}
+
+function GetABDirectories()
+{
+ var abManager = Cc["@mozilla.org/abmanager;1"].
+ getService(Ci.nsIAbManager);
+ var directoriesArray = [];
+ var collectedAddressbook = null;
+
+ var directories = abManager.directories;
+ while (directories.hasMoreElements()) {
+ var directory = directories.getNext().QueryInterface(Ci.nsIAbDirectory);
+ if (directory.isMailList) {
+ continue;
+ }
+ var uri = directory.URI;
+ if (uri === kPersonalAddressbookUri) {
+ directoriesArray.unshift(directory);
+ } else {
+ if (uri === kCollectedAddressbookUri) {
+ collectedAddressbook = directory;
+ } else {
+ directoriesArray.push(directory);
+ }
+ }
+ }
+ if (collectedAddressbook) {
+ directoriesArray.push(collectedAddressbook);
+ }
+ return directoriesArray;
+}
+
+/* Only called in TB < 29 */
+function BuildMailListArray(parentDir)
+{
+ var array = [];
+ var subDirectories = parentDir.childNodes;
+ while (subDirectories.hasMoreElements()) {
+ var directory = subDirectories.getNext().QueryInterface(Ci.nsIAbDirectory);
+ if (directory.isMailList) {
+ var listName = directory.dirName;
+ var listDescription = directory.description;
+
+ // from nsMsgMailList constructor
+ var email = !listDescription ? listName : listDescription;
+ var fullAddress;
+ // makeFullAddress was changed to makeMimeHeader in Thunderbird 29 (bug 842632)
+ if (typeof MailServices.headerParser.makeMimeHeader === "function") {
+ fullAddress = MailServices.headerParser.makeMimeHeader([{name: listName, email: email}], 1);
+ } else {
+ fullAddress = MailServices.headerParser.makeFullAddress(listName, email);
+ }
+
+ var list = { email: email, fullName : fullAddress, directory : directory };
+ array.push(list);
+ }
+ }
+ return array;
+}
+
+function GetMailListAddresses(name, mailListArray)
+{
+ for (var i = 0; i < mailListArray.length; ++i) {
+ if (name.toLowerCase() === mailListArray[i].fullName.toLowerCase() ||
+ name.toLowerCase() === mailListArray[i].email.toLowerCase()) {
+ return mailListArray[i].directory.addressLists;
+ }
+ }
+ return undefined;
+}
+
+function BounceToolboxCustomizeInit()
+{
+ if (document.commandDispatcher.focusedWindow === content) {
+ window.focus();
+ }
+ updateEditableFields(true);
+ GetMsgHeadersToolbarElement().setAttribute("moz-collapsed", true);
+ document.getElementById("compose-toolbar-sizer").setAttribute("moz-collapsed", true);
+ document.getElementById("content-frame").setAttribute("moz-collapsed", true);
+ toolboxCustomizeInit("mail-menubar");
+}
+
+function BounceToolboxCustomizeDone(aToolboxChanged)
+{
+ toolboxCustomizeDone("mail-menubar", getMailToolbox(), aToolboxChanged);
+ GetMsgHeadersToolbarElement().removeAttribute("moz-collapsed");
+ document.getElementById("compose-toolbar-sizer").removeAttribute("moz-collapsed");
+ document.getElementById("content-frame").removeAttribute("moz-collapsed");
+ updateEditableFields(false);
+ SetMsgBodyFrameFocus();
+}
+
+function BounceToolboxCustomizeChange(aEvent)
+{
+ toolboxCustomizeChange(getMailToolbox(), aEvent);
+}
+
+function getPref(aPrefName, aIsComplex) {
+ if (aIsComplex) {
+ return Services.prefs.getComplexValue(aPrefName, Ci.nsISupportsString).data;
+ }
+ switch (Services.prefs.getPrefType(aPrefName)) {
+ case Ci.nsIPrefBranch.PREF_BOOL:
+ return Services.prefs.getBoolPref(aPrefName);
+ case Ci.nsIPrefBranch.PREF_INT:
+ return Services.prefs.getIntPref(aPrefName);
+ case Ci.nsIPrefBranch.PREF_STRING:
+ return Services.prefs.getCharPref(aPrefName);
+ default: // includes nsIPrefBranch.PREF_INVALID
+ return null;
+ }
+}
diff --git a/chrome/content/mailredirect-debug.js b/chrome/content/mailredirect-debug.js
new file mode 100644
index 0000000..5600a18
--- /dev/null
+++ b/chrome/content/mailredirect-debug.js
@@ -0,0 +1,84 @@
+"use strict";
+
+(function() {
+
+const Cc = Components.classes, Ci = Components.interfaces;
+
+const prefString = "extensions.mailredirect.debug";
+
+window.MailredirectDebug = {
+ Dump: function()
+ {
+ this.init();
+ }
+}
+
+MailredirectDebug.Dump.prototype =
+{
+ aConsoleService: null,
+ prefBranch: null,
+ number: 0,
+ debug: false,
+ observerAdded: false,
+
+ prefObserver:
+ {
+ mydump: null,
+ observe: function(subject, topic, prefName)
+ {
+ if (topic === "nsPref:changed") {
+ if (prefName === prefString) {
+ if (this.mydump) {
+ this.mydump.init();
+ }
+ }
+ }
+ }
+ },
+
+ init: function()
+ {
+ if (!this.prefBranch) {
+ var prefService = Cc["@mozilla.org/preferences-service;1"].
+ getService(Ci.nsIPrefService);
+ this.prefBranch = prefService.getBranch(null);
+ if (!("addObserver" in this.prefBranch)) {
+ // Only necessary prior to Gecko 13
+ try {
+ this.prefBranch = this.prefBranch.QueryInterface(Ci.nsIPrefBranch2);
+ } catch(ex) {
+ // windows doesn't know nsIPrefBranch2 interface
+ this.prefBranch = this.prefBranch.QueryInterface(Ci.nsIPrefBranchInternal);
+ }
+ }
+ }
+
+ if (!this.aConsoleService) {
+ this.aConsoleService = Cc["@mozilla.org/consoleservice;1"].
+ getService(Ci.nsIConsoleService);
+ }
+
+ if (!this.observerAdded) {
+ this.prefObserver.mydump = this;
+ this.prefBranch.addObserver(prefString, this.prefObserver, false);
+ this.observerAdded = true;
+ }
+
+ try {
+ this.debug = this.prefBranch.getBoolPref(prefString);
+ } catch(ex) { }
+
+ return;
+ },
+
+ dump : function(str)
+ {
+ if (this.debug) {
+ // this.aConsoleService.logStringMessage(str);
+ this.aConsoleService.logStringMessage("[mailredirect:" + ++this.number + "] " + str);
+ }
+ return;
+ }
+}
+
+})();
diff --git a/chrome/content/mailredirect-prefs-moz.xul b/chrome/content/mailredirect-prefs-moz.xul
new file mode 100644
index 0000000..af937e3
--- /dev/null
+++ b/chrome/content/mailredirect-prefs-moz.xul
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?xml-stylesheet href="chrome://mailredirect/skin/mailredirect-prefs.css" type="text/css"?>
+
+<!DOCTYPE overlay [
+ <!ENTITY % mailredirectPrefsDTD SYSTEM "chrome://mailredirect/locale/mailredirect-prefs.dtd" >
+ %mailredirectPrefsDTD;
+]>
+
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <prefpane id="mailredirect_pane"
+ label="&mailredirectSettings.label;"
+ script="chrome://mailredirect/content/mailredirect-prefs.js"
+ onpaneload="MailredirectPrefs.onload();">
+
+ <preferences>
+ <preference id="pref_copyToSentMail" name="extensions.mailredirect.copyToSentMail" type="bool"/>
+ <preference id="pref_addToForwardAs" name="extensions.mailredirect.addToForwardAs" type="bool"/>
+ <preference id="pref_hideRedirectMenuitems" name="extensions.mailredirect.hideRedirectMenuitems" type="bool"/>
+ <preference id="pref_concurrentConnections" name="extensions.mailredirect.concurrentConnections" type="int"/>
+ <preference id="pref_defaultResendTo" name="extensions.mailredirect.defaultResentTo" type="string"/>
+ <preference id="pref_defaultResendCc" name="extensions.mailredirect.defaultResentCc" type="string"/>
+ <preference id="pref_defaultResendBcc" name="extensions.mailredirect.defaultResentBcc" type="string"/>
+ <preference id="pref_defaultMode" name="extensions.mailredirect.defaultMode" type="string"/>
+ <preference id="pref_debug" name="extensions.mailredirect.debug" type="bool"/>
+ </preferences>
+
+ <stringbundleset id="stringbundleset">
+ <stringbundle id="bundle_mailredirect-prefs" src="chrome://mailredirect/locale/mailredirect-prefs.properties"/>
+ </stringbundleset>
+
+ <hbox>
+ <vbox>
+ <checkbox id="copyToSentMail" preference="pref_copyToSentMail"
+ label="&copyToSentMails.label;"
+ accesskey="&copyToSentMails.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&copyToSentMails.tooltip;"/>
+
+ <separator id="addToForwardAsSeparator" class="thin"/>
+
+ <checkbox id="addToForwardAs" preference="pref_addToForwardAs"
+ label="&addToForwardAs.label;"
+ accesskey="&addToForwardAs.accesskey;"
+ oncommand="MailredirectPrefs.updateHideMenuitems();"
+ tooltip="xToolTip" xtooltiptext="&addToForwardAs.tooltip;"/>
+
+ <separator id="hideRedirectMenuitemsSeparator" class="thin"/>
+
+ <checkbox id="hideRedirectMenuitems" preference="pref_hideRedirectMenuitems"
+ label="&hideRedirectMenuitems.label;"
+ accesskey="&hideRedirectMenuitems.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&hideRedirectMenuitems.tooltip;"
+ class="indent"/>
+
+ <separator class="thin"/>
+
+ <hbox>
+ <label control="concurrentConnections"
+ value="&concurrentConnections.label;"
+ accesskey="&concurrentConnections.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&concurrentConnections.tooltip;"/>
+ <textbox id="concurrentConnections"
+ preference="pref_concurrentConnections"
+ size="3"
+ tooltip="xToolTip" xtooltiptext="&concurrentConnections.tooltip;"/>
+ </hbox>
+
+ <separator class="thin"/>
+
+ <groupbox>
+ <caption label="&defaultRecipientsGroup.label;"/>
+ <grid>
+ <columns>
+ <column/>
+ <column/>
+ </columns>
+ <rows>
+ <row>
+ <label control="defaultResendTo"
+ value="&defaultResendTo.label;"
+ accesskey="&defaultResendTo.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultResendTo.tooltip;"/>
+ <textbox id="defaultResendTo"
+ preference="pref_defaultResendTo"
+ size="48"
+ onchange="MailredirectPrefs.updateDefaultMode();"
+ tooltip="xToolTip" xtooltiptext="&defaultResendTo.tooltip;"/>
+ </row>
+
+ <row>
+ <label control="defaultResendCc"
+ value="&defaultResendCc.label;"
+ accesskey="&defaultResendCc.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultResendCc.tooltip;"/>
+ <textbox id="defaultResendCc"
+ preference="pref_defaultResendCc"
+ size="48"
+ onchange="MailredirectPrefs.updateDefaultMode();"
+ tooltip="xToolTip" xtooltiptext="&defaultResendCc.tooltip;"/>
+ </row>
+
+ <row>
+ <label control="defaultResendBcc"
+ value="&defaultResendBcc.label;"
+ accesskey="&defaultResendBcc.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultResendBcc.tooltip;"/>
+ <textbox id="defaultResendBcc"
+ preference="pref_defaultResendBcc"
+ size="48"
+ onchange="MailredirectPrefs.updateDefaultMode();"
+ tooltip="xToolTip" xtooltiptext="&defaultResendBcc.tooltip;"/>
+ </row>
+ </rows>
+ </grid>
+ </groupbox>
+
+ <separator class="thin"/>
+
+ <hbox align="center">
+ <label control="defaultMode"
+ value="&defaultMode.label;"
+ accesskey="&defaultMode.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultMode.tooltip;"/>
+ <menulist id="defaultMode"
+ preference="pref_defaultMode"
+ tooltip="xToolTip" xtooltiptext="&defaultMode.tooltip;">
+ <menupopup>
+ <menuitem value="addr_to" label="&defaultModeResendTo.label;"/>
+ <menuitem value="addr_cc" label="&defaultModeResendCc.label;"/>
+ <menuitem value="addr_bcc" label="&defaultModeResendBcc.label;"/>
+ </menupopup>
+ </menulist>
+ </hbox>
+
+ <separator class="thick"/>
+
+ <hbox>
+ <checkbox preference="pref_debug" id="debug"
+ label="&debug.label;"
+ accesskey="&debug.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&debug.tooltip;"/>
+ <button id="saveConsoleContent"
+ class="dialog"
+ accesskey="&saveConsoleContent.accesskey2;"
+ label="&saveConsoleContent.label2;"
+ oncommand="MailredirectPrefs.saveConsoleContent();"/>
+ <button id="sendViaEmail"
+ class="dialog"
+ accesskey="&sendViaEmail.accesskey;"
+ label="&sendViaEmail.label;"
+ oncommand="MailredirectPrefs.sendViaEmail();"/>
+ </hbox>
+ </vbox>
+ <vbox flex="1"/>
+ </hbox>
+
+ <tooltip id="xToolTip" noautohide="true"
+ onpopupshowing="this.label=document.tooltipNode.getAttribute('xtooltiptext');"/>
+
+ </prefpane>
+
+</overlay>
diff --git a/chrome/content/mailredirect-prefs.js b/chrome/content/mailredirect-prefs.js
new file mode 100644
index 0000000..00180c3
--- /dev/null
+++ b/chrome/content/mailredirect-prefs.js
@@ -0,0 +1,324 @@
+"use strict";
+
+(function() {
+
+Components.utils.import("resource://gre/modules/Services.jsm");
+Components.utils.import("resource://gre/modules/NetUtil.jsm");
+try {
+ // mailServices.js has been renamed MailServices.jsm in TB63
+ Components.utils.import("resource:///modules/MailServices.jsm");
+} catch(ex) {
+ Components.utils.import("resource:///modules/mailServices.js"); // Gecko 5+ (TB5)
+}
+try {
+ Components.utils.import("resource://gre/modules/AppConstants.jsm"); // Gecko 45+
+} catch(ex) { };
+
+const THUNDERBIRD_ID = "{3550f703-e582-4d05-9a08-453d09bdfdc6}";
+const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
+
+const Cc = Components.classes, Ci = Components.interfaces;
+
+window.MailredirectPrefs = {
+
+ mInitialized: false,
+
+ onload: function()
+ {
+ MailredirectPrefs.init();
+ MailredirectPrefs.updateHideMenuitems();
+ MailredirectPrefs.updateDefaultMode();
+ },
+
+ init: function()
+ {
+ if (!MailredirectPrefs.mInitialized) {
+ var prefService = Cc["@mozilla.org/preferences-service;1"].
+ getService(Ci.nsIPrefService);
+ var defaultBranch = prefService.getDefaultBranch("extensions.mailredirect.");
+ defaultBranch.setBoolPref("addToForwardAs", true);
+ defaultBranch.setBoolPref("hideRedirectMenuitems", false);
+ defaultBranch.setIntPref("concurrentConnections", 5);
+ defaultBranch.setCharPref("defaultResentTo", "");
+ defaultBranch.setCharPref("defaultResentCc", "");
+ defaultBranch.setCharPref("defaultResentBcc", "");
+ defaultBranch.setCharPref("defaultMode", "addr_to");
+ defaultBranch.setBoolPref("debug", false);
+ defaultBranch.setIntPref("addresswidget.numRowsShownDefault", 3);
+ defaultBranch.setBoolPref("firstrun.button-contacts", false);
+ defaultBranch.setBoolPref("firstrun.unpack-icon", false);
+
+ MailredirectPrefs.mInitialized = true;
+ }
+ },
+
+ updateHideMenuitems: function()
+ {
+ var addToForwardAs = document.getElementById("addToForwardAs");
+ var hideMenuitems = document.getElementById("hideRedirectMenuitems");
+ hideMenuitems.disabled = !addToForwardAs.checked;
+ },
+
+ updateDefaultMode: function()
+ {
+ var defaultResendTo = document.getElementById("defaultResendTo");
+ var defaultResendCc = document.getElementById("defaultResendCc");
+ var defaultResendBcc = document.getElementById("defaultResendBcc");
+ var defaultMode = document.getElementById("defaultMode");
+ defaultMode.disabled = !(defaultResendTo.value.match(/^\s*$/) &&
+ defaultResendCc.value.match(/^\s*$/) &&
+ defaultResendBcc.value.match(/^\s*$/));
+ },
+
+ saveConsoleContent: function()
+ {
+ const nsIFilePicker = Ci.nsIFilePicker;
+
+ var strbundle = document.getElementById("bundle_mailredirect-prefs");
+
+ // open filePicker
+ var filePicker = Cc["@mozilla.org/filepicker;1"].
+ createInstance(nsIFilePicker);
+ filePicker.init(window, strbundle.getString("saveFile2"), nsIFilePicker.modeSave);
+ filePicker.appendFilters(nsIFilePicker.filterText);
+ filePicker.appendFilters(nsIFilePicker.filterAll);
+ filePicker.defaultString = "errorconsole.txt";
+
+ let filePickerCallback = function filePickerCallbackDone(aResult) {
+ if (aResult === nsIFilePicker.returnOK || aResult === nsIFilePicker.returnReplace) {
+ var file;
+ try {
+ file = filePicker.file.QueryInterface(Ci.nsIFile);
+ } catch(ex) {
+ // Starting with Gecko 14, `nsILocalFile` inherits all functions and attributes from `nsIFile`
+ file = filePicker.file.QueryInterface(Ci.nsILocalFile);
+ }
+
+ var fileStream = Cc["@mozilla.org/network/file-output-stream;1"].
+ createInstance(Ci.nsIFileOutputStream);
+
+ fileStream.init(file, -1, -1, null);
+
+ // for every nsIConsoleMessage save it to file
+ var consoleService = Cc["@mozilla.org/consoleservice;1"].
+ getService(Ci.nsIConsoleService);
+ var messagesArray = {};
+ // Retrieve the message array in a compatible way for both Gecko prior
+ // to 19 and Gecko 19 or later
+ var messagesArray = consoleService.getMessageArray(messagesArray, {}) || messagesArray.value;
+ for (var i = 0; i < messagesArray.length; ++i) {
+ var m = messagesArray[i].message;
+ m = (i+1) + ". " + m.replace(/^\s*[\n]+|[\n]+\s*$/g, "") + "\n";
+ fileStream.write(m, m.length);
+ }
+ fileStream.close();
+ }
+ }
+
+ try {
+ // Gecko 17+: Open the dialog asynchronously
+ filePicker.open(filePickerCallback);
+ } catch (ex) {
+ // Deprecated since Gecko 17: Display the file picker dialog
+ if (filePicker.show() !== Ci.nsIFilePicker.returnCancel) {
+ filePickerCallback(nsIFilePicker.returnOK);
+ }
+ }
+ },
+
+ sendViaEmail: function()
+ {
+ try {
+ var tempFile = Cc["@mozilla.org/file/directory_service;1"].
+ getService(Ci.nsIProperties).
+ get("TmpD", Ci.nsIFile);
+ tempFile.append("errorconsole.txt");
+ tempFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, parseInt("0600", 8));
+ var fileStream = Cc["@mozilla.org/network/file-output-stream;1"].
+ createInstance(Ci.nsIFileOutputStream);
+ fileStream.init(tempFile, -1, -1, 0);
+
+ // for every nsIConsoleMessage save it to file
+ var consoleService = Cc["@mozilla.org/consoleservice;1"].
+ getService(Ci.nsIConsoleService);
+ var messagesArray = {};
+ // Retrieve the message array in a compatible way for both Gecko prior
+ // to 19 and Gecko 19 or later
+ var messagesArray = consoleService.getMessageArray(messagesArray, {}) || messagesArray.value;
+ for (var i = 0; i < messagesArray.length; ++i) {
+ var m = messagesArray[i].message;
+ m = (i+1) + ". " + m.replace(/^\s*[\n]+|[\n]+\s*$/g, "") + "\n";
+ fileStream.write(m, m.length);
+ }
+ fileStream.close();
+
+ // Set up parameters and fields to use for the compose window.
+ let params = Cc["@mozilla.org/messengercompose/composeparams;1"].
+ createInstance(Ci.nsIMsgComposeParams);
+ params.type = Ci.nsIMsgCompType.New;
+ params.format = Ci.nsIMsgCompFormat.Default;
+
+ let fields = Cc["@mozilla.org/messengercompose/composefields;1"]
+ .createInstance(Ci.nsIMsgCompFields);
+ fields.forcePlainText = false;
+
+ let dataTxt = "";
+ fields.body = dataTxt;
+ // In general we can have non-ASCII characters, and compose's charset
+ // detection doesn't seem to work when the HTML part is pure ASCII but the
+ // text isn't. So take the easy way out and force UTF-8.
+ fields.characterSet = "UTF-8";
+ fields.bodyIsAsciiOnly = false;
+
+ let attachment = Cc["@mozilla.org/messengercompose/attachment;1"].
+ createInstance(Ci.nsIMsgAttachment);
+ var tempUri = Services.io.newFileURI(tempFile);
+ if (tempUri instanceof Ci.nsIFileURL) {
+ if (tempUri.file.exists()) {
+ attachment.size = tempUri.file.fileSize;
+ }
+ attachment.url = tempUri.spec;
+ } else {
+ // resolveURI does all the magic around working out what the
+ // attachment is, including web pages, and generating the correct uri.
+ let commandLine = Cc["@mozilla.org/toolkit/command-line;1"].
+ createInstance();
+ let uri = commandLine.resolveURI(tempFile.path);
+ // If uri is for a file and it exists set the attachment size.
+ if (uri instanceof Ci.nsIFileURL) {
+ if (uri.file.exists()) {
+ attachment.size = uri.file.fileSize;
+ }
+ attachment.url = uri.spec;
+ }
+ }
+ fields.addAttachment(attachment);
+ params.composeFields = fields;
+
+ // Our params are set up. Now open a compose window.
+ MailServices.compose.OpenComposeWindowWithParams(null, params);
+ } catch (ex) {
+ Components.utils.reportError(ex);
+ var PrefsBundle = document.getElementById("bundle_mailredirect-prefs");
+ var errorTitle = PrefsBundle.getString("tempFileErrorDlogTitle");
+ var errorMsg = PrefsBundle.getString("tempFileErrorDlogMessage");
+ Services.prompt.alert(window, errorTitle, errorMsg);
+ }
+ },
+
+ getPref: function (aPrefName, aIsComplex)
+ {
+ if (aIsComplex) {
+ return Services.prefs.getComplexValue(aPrefName, Ci.nsISupportsString).data;
+ }
+ switch (Services.prefs.getPrefType(aPrefName)) {
+ case Ci.nsIPrefBranch.PREF_BOOL:
+ return Services.prefs.getBoolPref(aPrefName);
+ case Ci.nsIPrefBranch.PREF_INT:
+ return Services.prefs.getIntPref(aPrefName);
+ case Ci.nsIPrefBranch.PREF_STRING:
+ return Services.prefs.getCharPref(aPrefName);
+ default: // includes nsIPrefBranch.PREF_INVALID
+ return null;
+ }
+ },
+
+ unpackIcon: function()
+ {
+ function copyFile(aURL, aSink) {
+ let uri = Services.io.newURI(aURL);
+ let channel = Services.io.newChannelFromURI2(uri,
+ null,
+ Services.scriptSecurityManager.getSystemPrincipal(),
+ null,
+ Components.interfaces.nsILoadInfo.SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS,
+ Components.interfaces.nsIContentPolicy.TYPE_OTHER);
+
+ NetUtil.asyncFetch(channel, function(aInputStream, aResult) {
+ if (!Components.isSuccessCode(aResult)) {
+ Components.utils.reportError("asyncFetch failed: " + aResult);
+ return;
+ }
+ NetUtil.asyncCopy(aInputStream, aSink, function(aResult) {
+ if (!Components.isSuccessCode(aResult)) {
+ Components.utils.reportError("NetUtil.asyncCopy failed: " + aResult);
+ }
+ });
+ });
+ }
+
+ let firstRunPref = "extensions.mailredirect.firstrun.unpack-icon";
+ if (!this.getPref(firstRunPref)) {
+ var iconArray;
+ var allExist = true;
+ var allCopied = true;
+ var platform = AppConstants.platform;
+ if (platform === "win") {
+ iconArray = [ "msgMailRedirectWindow.ico" ];
+ } else {
+ iconArray = [ "msgMailRedirectWindow.xpm", "msgMailRedirectWindow16.xpm" ];
+ }
+
+ for (var i = 0; i < iconArray.length; i++) {
+ let iconFilename = iconArray[i];
+ let profileIcon = Cc["@mozilla.org/file/directory_service;1"].
+ getService(Ci.nsIProperties).
+ get("ProfD", Ci.nsIFile);
+ profileIcon.append("extensions");
+ profileIcon.append("{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}");
+ profileIcon.append("chrome");
+ profileIcon.append("icons");
+ profileIcon.append("default");
+ profileIcon.append(iconFilename);
+
+ if (!profileIcon.exists()) {
+ // Icon doesn't exist, so extension isn't unpacked
+ allExist = false;
+ let chromeIcon = Cc["@mozilla.org/file/directory_service;1"].
+ getService(Ci.nsIProperties).
+ get("AChrom", Ci.nsIFile);
+ chromeIcon.append("icons");
+ chromeIcon.append("default");
+ chromeIcon.append(iconFilename);
+
+ if (!chromeIcon.exists()) {
+ // Icon doesn't exist in program folder, so copy it
+ var file;
+
+ try {
+ file = Cc["@mozilla.org/file/local;1"].
+ createInstance(Ci.nsIFile);
+ file.initWithFile(chromeIcon);
+ } catch(ex) {
+ // Starting with Gecko 14, `nsILocalFile` inherits all functions and attributes from `nsIFile`
+ file = Cc["@mozilla.org/file/local;1"].
+ createInstance(Ci.nsILocalFile);
+ file.initWithFile(chromeIcon);
+ }
+
+ var aFileOutputStream = Cc["@mozilla.org/network/file-output-stream;1"].
+ createInstance(Ci.nsIFileOutputStream);
+ try {
+ aFileOutputStream.init(file, -1, -1, 0);
+ copyFile("chrome://mailredirect-icons/content/default/" + iconFilename, aFileOutputStream);
+
+ if (!chromeIcon.exists()) {
+ // Icon still doesn't exist
+ Components.utils.reportError(chromeIcon.path + " still doesn't exist");
+ allCopied = false;
+ }
+ } catch(ex) {
+ Components.utils.reportError("Error initializing file output stream " + chromeIcon.path + ": " + ex);
+ allCopied = false;
+ }
+ }
+ }
+ }
+ if (!allExist && allCopied) {
+ Services.prefs.setBoolPref(firstRunPref, true);
+ }
+ }
+ }
+}
+
+})();
diff --git a/chrome/content/mailredirect-prefs.xul b/chrome/content/mailredirect-prefs.xul
new file mode 100644
index 0000000..6ddcbc0
--- /dev/null
+++ b/chrome/content/mailredirect-prefs.xul
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+<?xml-stylesheet type="text/css" href="chrome://messenger/skin/preferences/preferences.css"?>
+<?xml-stylesheet href="chrome://mailredirect/skin/mailredirect-prefs.css" type="text/css"?>
+
+<!DOCTYPE prefwindow [
+ <!ENTITY % mailredirectPrefsDTD SYSTEM "chrome://mailredirect/locale/mailredirect-prefs.dtd" >
+ %mailredirectPrefsDTD;
+]>
+
+<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ id="mailredirect"
+ title="&mailredirectSettings.title;"
+ onload="MailredirectPrefs.onload();">
+
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-prefs.js"/>
+
+ <prefpane id="paneRedirect">
+ <preferences>
+ <preference id="pref_copyToSentMail" name="extensions.mailredirect.copyToSentMail" type="bool"/>
+ <preference id="pref_addToForwardAs" name="extensions.mailredirect.addToForwardAs" type="bool"/>
+ <preference id="pref_hideRedirectMenuitems" name="extensions.mailredirect.hideRedirectMenuitems" type="bool"/>
+ <preference id="pref_concurrentConnections" name="extensions.mailredirect.concurrentConnections" type="int"/>
+ <preference id="pref_defaultResendTo" name="extensions.mailredirect.defaultResentTo" type="string"/>
+ <preference id="pref_defaultResendCc" name="extensions.mailredirect.defaultResentCc" type="string"/>
+ <preference id="pref_defaultResendBcc" name="extensions.mailredirect.defaultResentBcc" type="string"/>
+ <preference id="pref_defaultMode" name="extensions.mailredirect.defaultMode" type="string"/>
+ <preference id="pref_debug" name="extensions.mailredirect.debug" type="bool"/>
+ </preferences>
+
+ <stringbundleset id="stringbundleset">
+ <stringbundle id="bundle_mailredirect-prefs" src="chrome://mailredirect/locale/mailredirect-prefs.properties"/>
+ </stringbundleset>
+
+ <hbox>
+ <vbox>
+ <checkbox id="copyToSentMail" preference="pref_copyToSentMail"
+ label="&copyToSentMails.label;"
+ accesskey="&copyToSentMails.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&copyToSentMails.tooltip;"/>
+
+ <separator id="addToForwardAsSeparator" class="thin"/>
+
+ <checkbox id="addToForwardAs" preference="pref_addToForwardAs"
+ label="&addToForwardAs.label;"
+ accesskey="&addToForwardAs.accesskey;"
+ oncommand="MailredirectPrefs.updateHideMenuitems();"
+ tooltip="xToolTip" xtooltiptext="&addToForwardAs.tooltip;"/>
+
+ <separator id="hideRedirectMenuitemsSeparator" class="thin"/>
+
+ <checkbox id="hideRedirectMenuitems" preference="pref_hideRedirectMenuitems"
+ label="&hideRedirectMenuitems.label;"
+ accesskey="&hideRedirectMenuitems.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&hideRedirectMenuitems.tooltip;"
+ class="indent"/>
+
+ <separator class="thin"/>
+
+ <hbox>
+ <label control="concurrentConnections"
+ value="&concurrentConnections.label;"
+ accesskey="&concurrentConnections.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&concurrentConnections.tooltip;"/>
+ <textbox id="concurrentConnections"
+ preference="pref_concurrentConnections"
+ size="3"
+ tooltip="xToolTip" xtooltiptext="&concurrentConnections.tooltip;"/>
+ </hbox>
+
+ <separator class="thin"/>
+
+ <groupbox>
+ <caption label="&defaultRecipientsGroup.label;"/>
+ <grid>
+ <columns>
+ <column/>
+ <column/>
+ </columns>
+ <rows>
+ <row>
+ <label control="defaultResendTo"
+ value="&defaultResendTo.label;"
+ accesskey="&defaultResendTo.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultResendTo.tooltip;"/>
+ <textbox id="defaultResendTo"
+ preference="pref_defaultResendTo"
+ size="48"
+ onchange="MailredirectPrefs.updateDefaultMode();"
+ tooltip="xToolTip" xtooltiptext="&defaultResendTo.tooltip;"/>
+ </row>
+
+ <row>
+ <label control="defaultResendCc"
+ value="&defaultResendCc.label;"
+ accesskey="&defaultResendCc.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultResendCc.tooltip;"/>
+ <textbox id="defaultResendCc"
+ preference="pref_defaultResendCc"
+ size="48"
+ onchange="MailredirectPrefs.updateDefaultMode();"
+ tooltip="xToolTip" xtooltiptext="&defaultResendCc.tooltip;"/>
+ </row>
+
+ <row>
+ <label control="defaultResendBcc"
+ value="&defaultResendBcc.label;"
+ accesskey="&defaultResendBcc.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultResendBcc.tooltip;"/>
+ <textbox id="defaultResendBcc"
+ preference="pref_defaultResendBcc"
+ size="48"
+ onchange="MailredirectPrefs.updateDefaultMode();"
+ tooltip="xToolTip" xtooltiptext="&defaultResendBcc.tooltip;"/>
+ </row>
+ </rows>
+ </grid>
+ </groupbox>
+
+ <separator class="thin"/>
+
+ <hbox align="center">
+ <label control="defaultMode"
+ value="&defaultMode.label;"
+ accesskey="&defaultMode.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&defaultMode.tooltip;"/>
+ <menulist id="defaultMode"
+ preference="pref_defaultMode"
+ tooltip="xToolTip" xtooltiptext="&defaultMode.tooltip;">
+ <menupopup>
+ <menuitem value="addr_to" label="&defaultModeResendTo.label;"/>
+ <menuitem value="addr_cc" label="&defaultModeResendCc.label;"/>
+ <menuitem value="addr_bcc" label="&defaultModeResendBcc.label;"/>
+ </menupopup>
+ </menulist>
+ </hbox>
+
+ <separator class="thick"/>
+
+ <hbox>
+ <checkbox preference="pref_debug" id="debug"
+ label="&debug.label;"
+ accesskey="&debug.accesskey;"
+ tooltip="xToolTip" xtooltiptext="&debug.tooltip;"/>
+ <button id="saveConsoleContent"
+ class="dialog"
+ accesskey="&saveConsoleContent.accesskey2;"
+ label="&saveConsoleContent.label2;"
+ oncommand="MailredirectPrefs.saveConsoleContent();"/>
+ <button id="sendViaEmail"
+ class="dialog"
+ accesskey="&sendViaEmail.accesskey;"
+ label="&sendViaEmail.label;"
+ oncommand="MailredirectPrefs.sendViaEmail();"/>
+ </hbox>
+ </vbox>
+ <vbox flex="1"/>
+ </hbox>
+
+ </prefpane>
+
+ <tooltip id="xToolTip" noautohide="true"
+ onpopupshowing="this.label=document.tooltipNode.getAttribute('xtooltiptext');"/>
+
+</prefwindow>
diff --git a/chrome/content/mailredirect.js b/chrome/content/mailredirect.js
new file mode 100644
index 0000000..c6a9c40
--- /dev/null
+++ b/chrome/content/mailredirect.js
@@ -0,0 +1,447 @@
+// authors: Pawel Krzesniak, Ronald Wahl, Onno Ekker
+
+"use strict";
+
+(function() {
+
+const THUNDERBIRD_ID = "{3550f703-e582-4d05-9a08-453d09bdfdc6}";
+const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
+
+const Cc = Components.classes, Ci = Components.interfaces;
+
+window.MailredirectExtension = {
+
+ appInfo: Cc["@mozilla.org/xre/app-info;1"].
+ getService(Ci.nsIXULAppInfo),
+
+ isOffline: Cc["@mozilla.org/network/io-service;1"].
+ getService(Ci.nsIIOService).
+ offline,
+
+ addToForwardAs: true,
+ hideRedirectMenuitems: false,
+
+ OpenMailredirectComposeWindow: function()
+ {
+ var selectedURIs;
+ var server;
+ var folder;
+ if (typeof gFolderDisplay !== "undefined") {
+ selectedURIs = gFolderDisplay.selectedMessageUris;
+ folder = gFolderDisplay.displayedFolder;
+ } else {
+ var mailWindow = Cc["@mozilla.org/appshell/window-mediator;1"].
+ getService(Ci.nsIWindowMediator).getMostRecentWindow("");
+ selectedURIs = mailWindow.GetSelectedMessages();
+ folder = GetLoadedMsgFolder();
+ }
+ if (folder) {
+ server = folder.server;
+ }
+
+ var currentIdentity = {key: null};
+ if (server && (server.type === "imap" || server.type === "pop3")) {
+ currentIdentity = getIdentityForServer(server);
+ }
+
+ if (MailredirectExtension.appInfo.ID === THUNDERBIRD_ID) {
+ window.openDialog("chrome://mailredirect/content/mailredirect-compose-thunderbird.xul", "_blank",
+ "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar,center,dialog=no",
+ selectedURIs, currentIdentity.key);
+ } else if (MailredirectExtension.appInfo.ID === SEAMONKEY_ID) {
+ window.openDialog("chrome://mailredirect/content/mailredirect-compose-seamonkey.xul", "_blank",
+ "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar,center,dialog=no",
+ selectedURIs, currentIdentity.key);
+ }
+ },
+
+ MailredirectController: {
+ supportsCommand: function(aCommand)
+ {
+ switch(aCommand) {
+ case "cmd_mailredirect":
+ return true;
+ default:
+ return false;
+ }
+ },
+ isCommandEnabled: function(aCommand)
+ {
+ switch(aCommand) {
+ case "cmd_mailredirect":
+ if (!MailredirectExtension.isOffline) {
+ // Extra check for issue #9 (Init error in TB24 on Mac breaking the status bar)
+ if (gFolderDisplay) {
+ var windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
+ getService(Ci.nsIWindowMediator);
+ var currWindow = windowMediator.getMostRecentWindow("");
+ var currWindowType = currWindow.document.documentElement.getAttribute("windowtype");
+ if (currWindowType === "mail:messageWindow") {
+ return true;
+ } else if (currWindowType === "mail:3pane") {
+ return (GetNumSelectedMessages() > 0 && !gFolderDisplay.selectedMessageIsFeed);
+ }
+ } else {
+ Components.utils.reportError("MailredirectController cannot determine isCommandEnabled state for cmd_mailredirect, because gFolderDisplay is not yet initialized");
+ }
+ }
+ return false;
+ default:
+ return false;
+ }
+ },
+ doCommand: function(aCommand)
+ {
+ // if the user invoked a key short cut then it is possible that we got here for a command which is
+ // really disabled. kick out if the command should be disabled.
+ if (!this.isCommandEnabled(aCommand)) {
+ return;
+ }
+
+ switch(aCommand) {
+ case "cmd_mailredirect":
+ MailredirectExtension.OpenMailredirectComposeWindow();
+ break;
+ }
+ }
+ },
+
+ SetupController: function(event)
+ {
+ setTimeout(function() {
+ top.controllers.appendController(MailredirectExtension.MailredirectController);
+ goUpdateCommand("cmd_mailredirect");
+ MailredirectExtension.UpdateCommand();
+ }, 0);
+ },
+
+ OfflineObserver: {
+ observe: function(subject, topic, state)
+ {
+ // Sanity check
+ if (topic !== "network:offline-status-changed") {
+ return;
+ }
+ MailredirectExtension.isOffline = (state === "offline");
+ goUpdateCommand("cmd_mailredirect");
+ }
+ },
+
+ UpdateCommand: function(event)
+ {
+ goUpdateCommand("cmd_mailredirect");
+ },
+
+ FillMailContextMenu: function(event)
+ {
+ MailredirectExtension.UpdateCommand(event);
+
+ var item = document.getElementById("mailContext-mailredirect");
+ if (item !== null) {
+ // don't show mail items for links/images
+ // and don't show mail items when there are no messages selected
+ item.hidden = gContextMenu.onImage || gContextMenu.onLink || (gFolderDisplay.selectedCount === 0);
+ }
+
+ var multiForward = document.getElementById("mailContext-multiForwardAsAttachment");
+ var multiRedirect = document.getElementById("mailContext-multiMailredirect");
+ multiRedirect.hidden = multiForward.hidden;
+ if (multiRedirect.hidden !== true && item !== null) {
+ // Only show one Redirect menuitem
+ item.hidden = true;
+ }
+ },
+
+ MultimessageClick: function(event)
+ {
+ if (event.button === 0) {
+ goDoCommand("cmd_mailredirect")
+ }
+ },
+
+ AddRedirectButtonToElement: function(el)
+ {
+ var head = el.contentDocument.getElementsByTagName("head").item(0);
+ var newEl = document.createElement("link");
+ newEl.setAttribute("rel", "stylesheet");
+ newEl.setAttribute("type", "text/css");
+ newEl.setAttribute("href", "chrome://mailredirect-os/skin/messageHeader.css");
+ head.appendChild(newEl);
+
+ var hdrMailredirectButton = document.getElementById("hdrMailredirectButton");
+ if (hdrMailredirectButton === null) {
+ // The CompactHeader extension can hide the hdrMailredirectButton and add a copy of
+ // the mailredirect-toolbarbutton button from the Mail toolbar to the msgHeaderViewDeck
+ hdrMailredirectButton = document.getElementById("msgHeaderViewDeck").getElementsByClassName("customize-header-toolbar-mailredirect-toolbarbutton").item(0);
+ }
+ if (hdrMailredirectButton === null) {
+ // Try the mail toolbar header button when the message hader redirect button is not found
+ hdrMailredirectButton = document.getElementById("mailredirect-toolbarbutton");
+ }
+ if (hdrMailredirectButton !== null) {
+ // Only create a redirect button for multimessage view if one is found on message header or toolbar
+ var disabled = hdrMailredirectButton.getAttribute("disabled");
+ var label = hdrMailredirectButton.getAttribute("label");
+ var image = window.getComputedStyle(hdrMailredirectButton, null).getPropertyValue("list-style-image");
+ var region = window.getComputedStyle(hdrMailredirectButton, null).getPropertyValue("-moz-image-region");
+ if (disabled && region !== "auto") {
+ // Calculate the right region...
+ // Disabled: -moz-image-region: rect(32px, 16px, 48px, 0px);
+ // Normal: -moz-image-region: rect(16px, 16px, 32px, 0px);
+ // Normal is always the rect above Disabled
+ let coords = region.replace("rect(", "").replace("px)", "").replace("px", "", "g").split(", ");
+ if (coords[0] !== "0") {
+ coords[0] = coords[0].toString() - coords[1].toString();
+ coords[2] = coords[2].toString() - coords[1].toString();
+ region = "rect(" + coords[0] + "px, " + coords[1] + "px, " + coords[2] + "px, " + coords[3] + "px)";
+ }
+ }
+ // headingwrapper was renamed to heading_wrapper in tb32 (bug 942638 patch part 5 v5)
+ el = el.contentDocument.getElementById("heading_wrapper") || el.contentDocument.getElementById("headingwrapper");
+ var parentEl = el && el.getElementsByTagName("toolbar").item(0); // header-view-toolbar
+ var oldEl = el && el.getElementsByTagName("toolbarbutton").item(0); // hdrArchiveButton
+ if (parentEl !== null && oldEl !== null) {
+ // Thunderbird 10+
+ var newEl = document.createElement("toolbarbutton");
+ newEl.setAttribute("id", "hdrMailredirectButton");
+ newEl.setAttribute("class", "toolbarbutton-1 msgHeaderView-button hdrMailredirectButton");
+ if (hdrMailredirectButton !== null) {
+ newEl.setAttribute("style", "list-style-image: " + image + "; -moz-image-region: " + region + ";");
+ newEl.setAttribute("label", label);
+ }
+ newEl.addEventListener("click", MailredirectExtension.MultimessageClick, false);
+ var insEl = parentEl.insertBefore(newEl, oldEl);
+ } else {
+ // Thunderbird 10-
+ var parentEl = el && el.getElementsByTagName("hbox").item(0); // buttonhbox
+ var oldEl = el && el.getElementsByTagName("button").item(0); // archive
+ if (parentEl !== null && oldEl !== null) {
+ var newEl = document.createElement("button");
+ newEl.setAttribute("id", "hdrMailredirectButton");
+ newEl.setAttribute("class", "toolbarbutton-1 msgHeaderView-button hdrMailredirectButton");
+ if (hdrMailredirectButton !== null) {
+ newEl.setAttribute("style", "list-style-image: " + image + "; -moz-image-region: " + region + ";");
+ newEl.setAttribute("label", label);
+ }
+ newEl.addEventListener("click", MailredirectExtension.MultimessageClick, false);
+ var insEl = parentEl.insertBefore(newEl, oldEl);
+ }
+ }
+ }
+ },
+
+ PrefObserver: {
+ observe: function(subject, topic, data)
+ {
+ // Sanity check
+ if (topic !== "nsPref:changed") {
+ return;
+ }
+
+ switch(data) {
+ case "addToForwardAs":
+ MailredirectExtension.addToForwardAs = MailredirectPrefs.getPref("extensions.mailredirect.addToForwardAs");
+ MailredirectExtension.UpdateForwardAsMenus();
+ break;
+ case "hideRedirectMenuitems":
+ MailredirectExtension.hideRedirectMenuitems = MailredirectPrefs.getPref("extensions.mailredirect.hideRedirectMenuitems");
+ MailredirectExtension.UpdateRedirectMenuitems();
+ break;
+ }
+ }
+ },
+
+ UpdateForwardAsMenus: function()
+ {
+ let addToForwardAs = MailredirectExtension.addToForwardAs;
+ let elementArray = [ "menu_forwardAsRedirect",
+ "button-ForwardAsRedirect",
+ "mailContext-forwardAsMailredirect",
+ "hdrForwardAsRedirectMenu",
+ "appmenu_forwardAsMailredirect" ];
+
+ for (var i = 0; i < elementArray.length; i++) {
+ var el = document.getElementById(elementArray[i]);
+ if (el) {
+ el.collapsed = !addToForwardAs;
+ }
+ }
+
+ MailredirectExtension.UpdateRedirectMenuitems();
+ },
+
+ UpdateRedirectMenuitems: function()
+ {
+ let hideRedirectMenuitems = MailredirectExtension.addToForwardAs &&
+ MailredirectExtension.hideRedirectMenuitems;
+ let elementArray = [ "MailredirectMenuItem",
+ "mailContext-mailredirect",
+ "appmenu_mailredirect" ]
+
+ if (!document.getElementById("mailContext-forwardAsMenu")) {
+ // SeaMonkey doesn't have a Forward As context menu, so don't hide the context menu item
+ elementArray.splice(1, 1);
+ }
+
+ for (var i = 0; i < elementArray.length; i++) {
+ var el = document.getElementById(elementArray[i]);
+ if (el) {
+ el.collapsed = hideRedirectMenuitems;
+ }
+ }
+
+ let submenuitem = document.getElementById("menu_forwardAsRedirect");
+ let menuitem = document.getElementById("MailredirectMenuItem");
+ if (hideRedirectMenuitems) {
+ submenuitem.setAttribute("key", "key_mailredirect");
+ if (menuitem.hasAttribute("key")) {
+ menuitem.removeAttribute("key");
+ }
+ } else {
+ if (submenuitem.hasAttribute("key")) {
+ submenuitem.removeAttribute("key");
+ }
+ menuitem.setAttribute("key", "key_mailredirect");
+ }
+ },
+
+ InstallListeners: function(event)
+ {
+ var el = document.getElementById("threadTree");
+ if (el !== null) {
+ el.addEventListener("select", MailredirectExtension.UpdateCommand, false);
+ }
+
+ el = document.getElementById("mailContext");
+ if (el !== null) {
+ el.addEventListener("popupshowing", MailredirectExtension.FillMailContextMenu, false);
+ }
+
+ // I've got to perform some tricks for multimessage redirect button, because it is in an iframe
+ el = document.getElementById("multimessage");
+ if (el !== null) {
+ MailredirectExtension.AddRedirectButtonToElement(el);
+ }
+ },
+
+ addButtonToMultimessageView: function(event)
+ {
+ if (event.target.id === "multimessage") {
+ MailredirectExtension.AddRedirectButtonToElement(event.target);
+ }
+ },
+
+ UninstallListeners: function(event)
+ {
+ var el = document.getElementById("threadTree");
+ if (el !== null) {
+ el.removeEventListener("select", MailredirectExtension.UpdateCommand, false);
+ }
+
+ el = document.getElementById("mailContext");
+ if (el !== null) {
+ el.removeEventListener("popupshowing", MailredirectExtension.FillMailContextMenu, false);
+ }
+
+ el = document.getElementById("multimessage");
+ if (el !== null) {
+ el = el.contentDocument.getElementById("hdrMailredirectButton");
+ if (el !== null) {
+ el.removeEventListener("click", MailredirectExtension.MultimessageClick, false);
+ }
+ }
+ },
+
+ AddObservers: function()
+ {
+ var observerService = Cc["@mozilla.org/observer-service;1"].
+ getService(Ci.nsIObserverService);
+ observerService.addObserver(MailredirectExtension.OfflineObserver, "network:offline-status-changed", false);
+
+ var prefService = Cc["@mozilla.org/preferences-service;1"].
+ getService(Ci.nsIPrefService);
+ window.prefBranch = prefService.getBranch("extensions.mailredirect.");
+ if (!("addObserver" in window.prefBranch)) {
+ // Only necessary prior to Gecko 13
+ try {
+ window.prefBranch = window.prefBranch.QueryInterface(Ci.nsIPrefBranch2);
+ } catch(ex) {
+ // windows doesn't know nsIPrefBranch2 interface
+ window.prefBranch = window.prefBranch.QueryInterface(Ci.nsIPrefBranchInternal);
+ }
+ }
+ window.prefBranch.addObserver("", MailredirectExtension.PrefObserver, false);
+
+ MailredirectExtension.addToForwardAs = MailredirectPrefs.getPref("extensions.mailredirect.addToForwardAs");
+ MailredirectExtension.hideRedirectMenuitems = MailredirectPrefs.getPref("extensions.mailredirect.hideRedirectMenuitems");
+ MailredirectExtension.UpdateForwardAsMenus();
+ },
+
+ RemoveObservers: function()
+ {
+ var observerService = Cc["@mozilla.org/observer-service;1"].
+ getService(Ci.nsIObserverService);
+ observerService.removeObserver(MailredirectExtension.OfflineObserver, "network:offline-status-changed");
+ window.prefBranch.removeObserver("", MailredirectExtension.PrefObserver);
+ }
+};
+
+window.MailredirectPrefs.init();
+
+window.addEventListener("load", MailredirectExtension.InstallListeners, false);
+window.addEventListener("load", MailredirectExtension.AddObservers, false);
+window.addEventListener("load", MailredirectExtension.SetupController, false);
+
+var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
+var versionChecker = Cc["@mozilla.org/xpcom/version-comparator;1"].getService(Ci.nsIVersionComparator);
+if (appInfo.ID === THUNDERBIRD_ID && versionChecker.compare(appInfo.version, "36.0") >= 0) {
+ window.addEventListener("DOMFrameContentLoaded", MailredirectExtension.addButtonToMultimessageView, true);
+}
+if (appInfo.ID === THUNDERBIRD_ID && versionChecker.compare(appInfo.version, "60.0") >= 0) {
+ // Starting in Thunderbird 60 add-ons aren't unpacked anymore
+ window.MailredirectPrefs.unpackIcon();
+}
+
+window.addEventListener("unload", MailredirectExtension.UninstallListeners, false);
+window.addEventListener("unload", MailredirectExtension.RemoveObservers, false);
+
+})();
+
+// Override InitMessageForward from Suite because it highlights the wrong element
+function InitMessageForward(aPopup)
+{
+ var kMsgForwardAsAttachment = 0;
+ var forwardType = Services.prefs.getIntPref("mail.forward_message_mode");
+
+ if (forwardType != kMsgForwardAsAttachment) {
+ // forward inline is the first menuitem
+ aPopup.firstChild.setAttribute("default", "true");
+ aPopup.getElementsByTagName("menuitem")[1].removeAttribute("default");
+ } else {
+ // attachment is the second menuitem
+ aPopup.getElementsByTagName("menuitem")[1].setAttribute("default", "true");
+ aPopup.firstChild.removeAttribute("default");
+ }
+}
+
+// Override MsgForwardMessage because it also triggers forward as attachment in Suite when Redirect is chosen
+function MsgForwardMessage(event)
+{
+ var kMsgForwardAsAttachment = 0;
+ if (event === null || event.target.id !== "button-ForwardAsRedirect") {
+ var forwardType = 0;
+ try {
+ forwardType = Services.prefs.getIntPref("mail.forward_message_mode");
+ }
+ catch (ex) {}
+
+ // mail.forward_message_mode could be 1, if the user migrated from 4.x
+ // 1 (forward as quoted) is obsolete, so we treat is as forward inline
+ // since that is more like forward as quoted then forward as attachment
+ if (forwardType === kMsgForwardAsAttachment) {
+ MsgForwardAsAttachment(event);
+ } else {
+ MsgForwardAsInline(event);
+ }
+ }
+}
diff --git a/chrome/content/mailredirect.xul b/chrome/content/mailredirect.xul
new file mode 100644
index 0000000..149fa13
--- /dev/null
+++ b/chrome/content/mailredirect.xul
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect-subjectCol.css" type="text/css"?>
+
+<!DOCTYPE overlay [
+ <!ENTITY % mailredirectDTD SYSTEM "chrome://mailredirect/locale/mailredirect.dtd">
+ %mailredirectDTD;
+]>
+
+<overlay id="mailRedirectOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
+
+ <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-prefs.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect-debug.js"/>
+ <script type="application/javascript" src="chrome://mailredirect/content/mailredirect.js"/>
+
+ <commandset id="mailToolbarItems">
+ <command id="cmd_mailredirect" oncommand="goDoCommand('cmd_mailredirect')" />
+ </commandset>
+
+ <keyset id="mailKeys">
+ <key id="key_mailredirect" key="&bounceMsgCmd.key;" modifiers="&bounceMsgCmd.modifiers;"
+ oncommand="goDoCommand('cmd_mailredirect')" />
+ </keyset>
+
+ <menupopup id="messageMenuPopup">
+ <menuitem id="MailredirectMenuItem"
+ label="&bounceCommand.label;"
+ accesskey="&bounceCommand.accesskey;"
+ insertafter="forwardAsMenu"
+ key="key_mailredirect"
+ command="cmd_mailredirect" />
+ </menupopup>
+
+ <menupopup id="menu_forwardAsPopup">
+ <menuitem id="menu_forwardAsRedirect"
+ label="&forwardAsRedirect.label;"
+ accesskey="&forwardAsRedirect.accesskey;"
+ insertafter="menu_forwardAsAttachment"
+ command="cmd_mailredirect" />
+ </menupopup>
+
+ <!-- if (thunderbird) -->
+ <toolbarpalette id="MailToolbarPalette">
+ <toolbarbutton id="mailredirect-toolbarbutton" class="toolbarbutton-1" label="&bounceCommand.label;"
+ tooltiptext="&bounceCommand.tooltip;" observes="cmd_mailredirect" insertafter="button-forward" />
+ </toolbarpalette>
+
+ <!-- elseif (seamonkey) -->
+ <hbox id="toolbar_button_box">
+ <toolbarbutton id="mailredirect-toolbarbutton" class="toolbarbutton-1" label="&bounceCommand.label;"
+ tooltiptext="&bounceCommand.tooltip;" observes="cmd_mailredirect" insertafter="button-forward" />
+ </hbox>
+ <!-- endif -->
+
+ <menupopup id="button-ForwardPopup"> <!-- thunderbird -->
+ <menuitem id="button-ForwardAsRedirect"
+ label="&forwardAsRedirect.label;"
+ tooltiptext="&forwardAsRedirect.tooltip;"
+ insertafter="button-ForwardAsAttachmentMenu,button-forwardAsMenu-forwardAsAttachment"
+ command="cmd_mailredirect" /> <!-- button-forwardAsMenu-forwardAsAttachment is added by Forward add-on -->
+ </menupopup>
+ <menupopup id="button-forwardPopup"> <!-- seamonkey, menu has a different id, menuitems have no id -->
+ <menuitem id="button-ForwardAsRedirect"
+ label="&forwardAsRedirect.label;"
+ accesskey="&forwardAsRedirect.accesskey;"
+ tooltiptext="&forwardAsRedirect.tooltip;"
+ command="cmd_mailredirect" />
+ </menupopup>
+
+ <menupopup id="mailContext">
+ <menuitem id="mailContext-mailredirect"
+ label="&bounceCommand.label;"
+ accesskey="&bounceCommand.accesskey;"
+ insertafter="mailContext-forwardAsMenu,mailContext-forward"
+ insertbefore="mailContext-multiForwardAsAttachment"
+ command="cmd_mailredirect" />
+ <menuitem id="mailContext-multiMailredirect"
+ label="&bounceCommand.label;"
+ accesskey="&bounceCommand.accesskey;"
+ insertafter="mailContext-multiForwardAsAttachment"
+ insertbefore="mailContext-editAsNew"
+ command="cmd_mailredirect" />
+ </menupopup>
+
+ <menupopup id="mailContext-forwardAsPopup">
+ <menuitem id="mailContext-forwardAsMailredirect" insertafter="mailContext-forwardAsAttachment"
+ label="&forwardAsRedirect.label;" accesskey="&forwardAsRedirect.accesskey;"
+ command="cmd_mailredirect" />
+ </menupopup>
+
+</overlay>
diff --git a/chrome/content/mailredirectCustomizeToolbar.xul b/chrome/content/mailredirectCustomizeToolbar.xul
new file mode 100644
index 0000000..0dae029
--- /dev/null
+++ b/chrome/content/mailredirectCustomizeToolbar.xul
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mailredirect-os/skin/messageHeader.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mailredirect-os/skin/mailredirect-compose.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mailredirect/skin/mailredirect.css" type="text/css"?>
+
+<overlay id="mailRedirectCustomizeToolbarOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <toolbarpaletteitem id="wrapper-mailredirect-toolbarbutton"
+ insertafter="wrapper-button-forward,wrapper-button-replylist,wrapper-button-replyall,wrapper-button-reply"/>
+ <toolbarpaletteitem id="wrapper-hdrMailredirectButton"
+ insertafter="wrapper-hdrMenuForwardButton,wrapper-hdrForwardButton,wrapper-hdrReplyToSenderButton,wrapper-hdrSmartReplyButton"/>
+</overlay>
diff --git a/chrome/content/mailredirectMessengerOverlay.xul b/chrome/content/mailredirectMessengerOverlay.xul
new file mode 100644
index 0000000..77dfb88
--- /dev/null
+++ b/chrome/content/mailredirectMessengerOverlay.xul
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE overlay [
+ <!ENTITY % mailredirectDTD SYSTEM "chrome://mailredirect/locale/mailredirect.dtd">
+ %mailredirectDTD;
+]>
+
+<overlay id="mailredirectMessengerOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <menupopup id="appmenu_messageMenuPopup">
+ <menuitem id="appmenu_mailredirect"
+ label="&bounceCommand.label;"
+ insertafter="appmenu_forwardAsMenu,appmenu_forwardAsAttachments"
+ observes="cmd_mailredirect" />
+ </menupopup>
+
+ <menupopup id="appmenu_forwardAsPopup">
+ <menuitem id="appmenu_forwardAsMailredirect"
+ label="&forwardAsRedirect.label;"
+ insertafter="appmenu_forwardAsAttachment"
+ observes="cmd_mailredirect" />
+ </menupopup>
+
+</overlay>
diff --git a/chrome/content/mailredirectPrefsOverlay.xul b/chrome/content/mailredirectPrefsOverlay.xul
new file mode 100644
index 0000000..73325b4
--- /dev/null
+++ b/chrome/content/mailredirectPrefsOverlay.xul
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- This is the overlay that adds "Mail Redirect" entry to the prefs. -->
+
+<!DOCTYPE window [
+ <!ENTITY % mailredirectPrefsDTD SYSTEM "chrome://mailredirect/locale/mailredirect-prefs.dtd" >
+ %mailredirectPrefsDTD;
+]>
+
+<overlay id="mailRedirectPrefsOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <treechildren id="messengerChildren">
+ <treeitem id="mailredirect" insertafter="composingItem"
+ label="&mailredirectSettings.label;"
+ prefpane="mailredirect_pane"
+ url="chrome://mailredirect/content/mailredirect-prefs-moz.xul" />
+ </treechildren>
+
+</overlay>
diff --git a/chrome/content/msgHdrViewOverlay.xul b/chrome/content/msgHdrViewOverlay.xul
new file mode 100644
index 0000000..53833e0
--- /dev/null
+++ b/chrome/content/msgHdrViewOverlay.xul
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE overlay [
+ <!ENTITY % msgHdrViewOverlayDTD SYSTEM "chrome://mailredirect/locale/msgHdrViewOverlay.dtd">
+ %msgHdrViewOverlayDTD;
+ <!ENTITY % mailredirectDTD SYSTEM "chrome://mailredirect/locale/mailredirect.dtd">
+ %mailredirectDTD;
+]>
+
+<?xml-stylesheet href="chrome://mailredirect-os/skin/messageHeader.css" type="text/css"?>
+
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <toolbarpalette id="header-view-toolbar-palette">
+ <toolbarbutton id="hdrMailredirectButton"
+ label="&hdrMailredirectButton1.label;"
+ tooltiptext="&hdrMailredirectButton1.tooltip;"
+ oncommand="cmd_mailredirect(event);RestoreFocusAfterHdrButton();"
+ observes="cmd_mailredirect"
+ class="toolbarbutton-1 msgHeaderView-button hdrMailredirectButton" />
+ </toolbarpalette>
+
+ <menupopup id="hdrForwardDropdown">
+ <menuitem id="hdrForwardAsRedirectMenu"
+ label="&bounceCommand.label;"
+ tooltiptext="&forwardAsRedirect.tooltip;"
+ insertafter="hdrForwardAsAttachmentMenu"
+ command="cmd_mailredirect"/>
+ </menupopup>
+
+ <toolbar id="header-view-toolbar"
+ defaultset="hdrReplyToSenderButton,hdrSmartReplyButton,hdrForwardButton,hdrMailredirectButton,hdrArchiveButton,hdrJunkButton,hdrTrashButton,otherActionsButton"/>
+
+</overlay>
diff --git a/chrome/content/xtooltip.xml b/chrome/content/xtooltip.xml
new file mode 100644
index 0000000..6c6ada5
--- /dev/null
+++ b/chrome/content/xtooltip.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<bindings id="popupBindings"
+ xmlns="http://www.mozilla.org/xbl"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:xbl="http://www.mozilla.org/xbl">
+
+ <binding id="xtooltip" extends="chrome://global/content/bindings/popup.xml#tooltip">
+ <content>
+ <xul:vbox style="max-width: 40em;" anonid="xtooltipBox"/>
+ </content>
+
+ <implementation>
+ <property name="label" onget="return this.getAttribute('label');">
+ <setter><![CDATA[
+ this.setAttribute('label', val);
+
+ var xtooltipBox = document.getAnonymousElementByAttribute(this, "anonid", "xtooltipBox")
+ while(xtooltipBox.hasChildNodes()) {
+ xtooltipBox.removeChild(xtooltipBox.firstChild);
+ }
+
+ if (val === "") {
+ return val;
+ }
+
+ var labelsArray = val.split("\\n");
+ for (var l in labelsArray) {
+ const mailredirect_XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ var xtooltipLabel = document.createElementNS( mailredirect_XUL_NS, "label" );
+ xtooltipLabel.appendChild( document.createTextNode(labelsArray[l]) )
+ xtooltipBox.appendChild( xtooltipLabel );
+ }
+
+ return val;
+ ]]>
+ </setter>
+ </property>
+ </implementation>
+
+ <handlers>
+ <handler event="popupshowing"><![CDATA[
+ this.height = this.boxObject.height;
+ ]]>
+ </handler>
+ <handler event="popuphiding"><![CDATA[
+ this.height = "";
+ ]]>
+ </handler>
+
+ </handlers>
+
+ </binding>
+</bindings>
diff --git a/chrome/icons/default/msgMailRedirectWindow.ico b/chrome/icons/default/msgMailRedirectWindow.ico
new file mode 100644
index 0000000..e6b2e97
--- /dev/null
+++ b/chrome/icons/default/msgMailRedirectWindow.ico
Binary files differ
diff --git a/chrome/icons/default/msgMailRedirectWindow.xpm b/chrome/icons/default/msgMailRedirectWindow.xpm
new file mode 100644
index 0000000..1fbc8de
--- /dev/null
+++ b/chrome/icons/default/msgMailRedirectWindow.xpm
@@ -0,0 +1,140 @@
+/* XPM */
+static char *msgMailRedirectWindow[] = {
+"32 32 104 2 0 0",
+" c #399627",
+". c #3A9B27",
+"X c #3B9E28",
+"o c #3DAB2B",
+"O c #3FAA2A",
+"+ c #4FA529",
+"@ c #40B32D",
+"# c #41B82E",
+"$ c #43BB2F",
+"% c #45C331",
+"& c #47C832",
+"* c #48CA32",
+"= c #48CB33",
+"- c #49CC34",
+"; c #4FCB3A",
+": c #4ECD39",
+"> c #51CE3C",
+", c #5EA24F",
+"< c #55CF41",
+"1 c #58D044",
+"2 c #5ED14B",
+"3 c #62D34F",
+"4 c #6BD559",
+"5 c #6CD55B",
+"6 c #70D75F",
+"7 c #7DD96B",
+"8 c #7EDA6C",
+"9 c #B18266",
+"0 c #B4866B",
+"q c #B5896D",
+"w c #BA8F73",
+"e c #BC9376",
+"r c #B8927D",
+"t c #C29C7D",
+"y c #82DB71",
+"u c #84DB73",
+"i c #85DC74",
+"p c #8ADD79",
+"a c #B69681",
+"s c #91BB87",
+"d c #BFA28C",
+"f c #C3A492",
+"g c #C6AE9E",
+"h c #CAAC9A",
+"j c #CEB3A2",
+"k c #D4BAAA",
+"l c #8DD482",
+"z c #93DF81",
+"x c #9AC891",
+"c c #9AE189",
+"v c #A1E391",
+"b c #A4E393",
+"n c #A4E096",
+"m c #A8E498",
+"M c #ACE49F",
+"N c #B7D0B2",
+"B c #B0E7A1",
+"V c #B1E7A3",
+"C c #B4E6A6",
+"Z c #B4E6A7",
+"A c #B3E8A4",
+"S c #BAE8AD",
+"D c #BBEAAC",
+"F c #BAE5B4",
+"G c #DBC7BB",
+"H c #C5EDB9",
+"J c #C9EEBE",
+"K c #E4D5C5",
+"L c #E7D8C5",
+"P c #E9D9C4",
+"I c #E6D9CC",
+"U c #EADCCA",
+"Y c #CCEFC1",
+"T c #D1E0CE",
+"R c #CEF0C2",
+"E c #CAF0C4",
+"W c #CEF0C4",
+"Q c #D4F1CB",
+"! c #D6F2CC",
+"~ c #DDE8DA",
+"^ c #D9F3D1",
+"/ c #DBF3D3",
+"( c #DFF6DC",
+") c #EDE1CD",
+"_ c #F2E3CC",
+"` c #EFE5D3",
+"' c #ECE4DA",
+"] c #E0E9DD",
+"[ c #F2E6D3",
+"{ c #F2E8D7",
+"} c #F4ECDC",
+"| c #F2EBE7",
+" . c #E6F6E4",
+".. c #E8F8E3",
+"X. c #F8F1E4",
+"o. c #FAF4E6",
+"O. c #FCF6EB",
+"+. c #F1FBEE",
+"@. c #FDF9EE",
+"#. c #F9F5F3",
+"$. c #FEFCF6",
+"%. c #FDFCFB",
+"&. c #FCFEFB",
+"*. c None",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.q q q q q q 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 q q q q q q *.*.",
+"*.*.q P _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ P q *.*.",
+"*.*.w U L [ } } } } } } } } } } } } } } } } } } } } [ L U w *.*.",
+"*.*.w ) ) K [ o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.[ K ) ) w *.*.",
+"*.*.w ` ` ` K ` $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.` K ` ` ` w *.*.",
+"*.*.e { [ [ [ L K %.%.%.%.%.%.%.%.%.%.%.%.%.%.K L [ [ [ { e *.*.",
+"*.*.e } } } { [ U G %.%.%.%.%.%.%.%.%.%.%.%.G U [ { } } } e *.*.",
+"*.*.r } } } .F F l l D %.%.%.+ ] %.%.%.#.k ` } } } } } } r *.*.",
+"*.*.r o.X.| &.+.+...^ 7 | %.%.+ + ] %.| j [ } } } | | X.o.r *.*.",
+"*.*.t o.o.o.( E E 5 R $ f ' %.+ / + ] f a I | X.X.o.o.o.o.t *.*.",
+"*.*.t O.O.O.O.o.o.* V # %.f G + Q ! + ] #.d K o.o.O.O.O.O.t *.*.",
+"*.*.t @.@.@.O.O.K * V # %.%.h + W m J + ] %.g K O.O.@.@.@.t *.*.",
+"*.*.e { [ [ [ L K O i % @ @ . o b v V Y + ] %.K L [ [ [ { e *.*.",
+"*.*.w ` ` ` K ` $.o 5 u p p z A b v v V Y + ] $.` K ` ` ` w *.*.",
+"*.*.w ) ) K [ o.o., < 1 * * & & = > > 2 6 H + o.o.[ K ) ) w *.*.",
+"*.*.w U L [ } } } ~ y ; ; * = = = = & : Z Z + } } [ L U w *.*.",
+"*.*.q P _ _ _ _ _ ~ y ; ; * = = = = & : Z + _ _ _ _ _ P q *.*.",
+"*.*.q q q q q q 0 0 s X c c z u - & & 3 S + T 0 q q q q q q *.*.",
+"*.*.*.*.*.*.*.*.*.*.*.x + + + + 8 4 4 M + T *.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.+ B C C + T *.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.+ B C + T *.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.+ n + T *.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.+ + N *.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.+ ~ *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*."
+};
diff --git a/chrome/icons/default/msgMailRedirectWindow16.xpm b/chrome/icons/default/msgMailRedirectWindow16.xpm
new file mode 100644
index 0000000..0c633d4
--- /dev/null
+++ b/chrome/icons/default/msgMailRedirectWindow16.xpm
@@ -0,0 +1,61 @@
+/* XPM */
+static char *msgMailRedirectWindow16[] = {
+"16 16 41 1 0",
+" c #4A9C2E",
+". c #4B9E2E",
+"X c #4DA12F",
+"o c #50A832",
+"O c #51AA32",
+"+ c #54B636",
+"@ c #5EC63E",
+"# c #66C848",
+"$ c #6AC949",
+"% c #6ECA4E",
+"& c #77CD59",
+"* c #7DD060",
+"= c #83B171",
+"- c #C59E7B",
+"; c #82D266",
+": c #BF9E8A",
+"> c #C5A181",
+", c #C6AB92",
+"< c #CEB7A1",
+"1 c #D1BBAA",
+"2 c #99D880",
+"3 c #AEDF99",
+"4 c #B2E19D",
+"5 c #B5C9AB",
+"6 c #B7E3A1",
+"7 c #CBEABA",
+"8 c #E7D7C6",
+"9 c #ECDDC9",
+"0 c #D1ECC2",
+"q c #F5E9D7",
+"w c #F5EDDE",
+"e c #F8EEDD",
+"r c #F3EDE1",
+"t c #F5EFEB",
+"y c #F9F3E6",
+"u c #F5F0ED",
+"i c #FBF5E9",
+"p c #FDF9EF",
+"a c #FEFCF6",
+"s c #FEFEFE",
+"d c None",
+"dddddddddddddddd",
+"dddddddddddddddd",
+"d>------------>d",
+"d-9qeeeeeeeeq9-d",
+"d-q9rssssssr9q-d",
+"d-rw88ssss88wr-d",
+"d-i5y,<ut<,yyi-d",
+"d-a@28s+:s81pa-d",
+"d-qO+ss ssr9q-d",
+"d-9o3 0 eeq9-d",
+"d>-X#66647 --->d",
+"ddd ;$&%@*0 dddd",
+"dddd ;;;+; ddddd",
+"ddddd ;.dddddd",
+"ddddddd ddddddd",
+"ddddddd=dddddddd"
+};
diff --git a/chrome/locale/ar/mailredirect-compose.dtd b/chrome/locale/ar/mailredirect-compose.dtd
new file mode 100644
index 0000000..9dcc923
--- /dev/null
+++ b/chrome/locale/ar/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "إعادة توجيه البريد">
+
+<!ENTITY fileMenu.label "ملف">
+<!ENTITY fileMenu.accesskey "م">
+<!ENTITY forwardBounce.label "أعِد التوجيه">
+<!ENTITY forwardBounce.accesskey "ت">
+<!ENTITY closeCmd.label "أغلق">
+<!ENTITY closeCmd.accesskey "غ">
+
+<!ENTITY viewMenu.label "منظور">
+<!ENTITY viewMenu.accesskey "ظ">
+<!ENTITY viewToolbarsMenuNew.label "أشرطة الأدوات">
+<!ENTITY viewToolbarsMenuNew.accesskey "ش">
+<!ENTITY menubarCmd.label "شريط القوائم">
+<!ENTITY menubarCmd.accesskey "ق">
+
+<!ENTITY tasksMenu.label "أدوات">
+<!ENTITY tasksMenu.accesskey "د">
+<!ENTITY messengerCmd.label "البريد و مجموعات الأخبار">
+<!ENTITY messengerCmd.accesskey "خ">
+<!ENTITY addressBookCmd.label "دفتر العناوين">
+<!ENTITY addressBookCmd.accesskey "ع">
+
+<!ENTITY bounceButton.label "أعِد التوجيه">
+<!ENTITY bounceButton.tooltip "أعِد توجيه الرسائل">
+<!ENTITY addressButton.label "دفتر العناوين">
+<!ENTITY addressButton.tooltip "انتقل إلى دفتر العناوين">
+<!ENTITY throbberItem.title "مؤشّر النشاط">
+<!ENTITY throbber.tooltip "انتقل إلى صفحة &vendorShortName; الرئيسية">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "خصّص…">
+<!ENTITY customizeToolbar.accesskey "خ">
+<!ENTITY showBounceToolbarCmd.label "شريط إعادة التوجيه">
+<!ENTITY showBounceToolbarCmd.accesskey "ش">
+<!ENTITY showStatusbarCmd.label "شريط الحالة">
+<!ENTITY showStatusbarCmd.accesskey "ح">
+
+<!ENTITY addressSidebar.label "شريط جهات الاتصال الجانبي">
+<!ENTITY addressSidebar.accesskey "ت">
+<!ENTITY addressesSidebarTitle.label "جهات الاتصال">
+<!ENTITY addressSidebarButton.label "جهات الاتصال">
+<!ENTITY addressSidebarButton.tooltip "اختر مستلمًا من دفتر العناوين">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 9em;">
+
+<!ENTITY resendFromAddr.label "إعادة إرسال-من:">
+<!ENTITY resendFromAddr.accesskey "د">
+
+<!ENTITY resendToAddr.label "إعادة إرسال-إلى:">
+<!ENTITY resendCcAddr.label "إعادة إرسال-نسخ:">
+<!ENTITY resendBccAddr.label "إعادة إرسال-نسخ عمياء:">
+
+<!ENTITY bounceMailsLabel.label "سيُعاد توجيه الرسائل الآتية:">
+
+<!ENTITY subject.label "الموضوع">
+<!ENTITY sender.label "المرسِل">
+<!ENTITY date.label "التاريخ">
diff --git a/chrome/locale/ar/mailredirect-compose.properties b/chrome/locale/ar/mailredirect-compose.properties
new file mode 100644
index 0000000..9692e92
--- /dev/null
+++ b/chrome/locale/ar/mailredirect-compose.properties
@@ -0,0 +1,55 @@
+mailredirectWindowTitlePrefix=إعادة توجيه البريد:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=إعادة توجيه البريد
+initErrorDlogMessage=حدث عطل أثناء إنشاء نافذة إعادة توجيه البريد. رجاء المحاولة مرة أخرى.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=12
+
+resendToContextMenuLabelTB=أضِف إلى حقل ”إعادة إرسال-إلى“
+resendToContextMenuAccesskeyTB=ض
+resendCcContextMenuLabelTB=أضِف إلى حقل ”إعادة إرسال-نسخ“
+resendCcContextMenuAccesskeyTB=ن
+resendBccContextMenuLabelTB=أضِف إلى حقل ”إعادة إرسال-نسخ عمياء“
+resendBccContextMenuAccesskeyTB=ع
+resendToButtonLabel=أضِف إلى ”إعادة إرسال-إلى“:
+resendToButtonAccesskey=ض
+resendCcButtonLabel=أضِف إلى ”إعادة إرسال-نسخ“:
+resendCcButtonAccesskey=ن
+resendBccButtonLabel=أضِف إلى ”إعادة إرسال-نسخ عمياء“:
+resendBccButtonAccesskey=ع
+resendToContextMenuLabelSM=إعادة إرسال-إلى->
+resendToContextMenuAccesskeySM=د
+resendCcContextMenuLabelSM=إعادة إرسال-نسخ->
+resendCcContextMenuAccesskeySM=ن
+resendBccContextMenuLabelSM=إعادة إرسال-نسخ عمياء->
+resendBccContextMenuAccesskeySM=ع
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=أرسِل الرسالة;أرسِل الرسالتين;أرسِل الرسائل;أرسِل الرسائل;أرسِل الرسائل;أرسِل الرسائل
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=أمتأكد من أنك مستعد لإرسال هذه الرسالة؟;أمتأكد من أنك مستعد لإرسال هاتين الرسالتين؟;أمتأكد من أنك مستعد لإرسال هذه الرسائل؟;أمتأكد من أنك مستعد لإرسال هذه الرسائل؟;أمتأكد من أنك مستعد لإرسال هذه الرسائل؟;أمتأكد من أنك مستعد لإرسال هذه الرسائل؟
+sendMessageCheckSendButtonLabel=أرسِل
+
+CheckMsg=لا تعرض هذا المربع الحواري مرة أخرى.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=تم إرسال الرسالة;تم إرسال الرسالتين;تم إرسال الرسائل;تم إرسال الرسائل;تم إرسال الرسائل;تم إرسال الرسائل
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=فشل إرسال الرسالة; فشل إرسال الرسالتين; فشل إرسال الرسائل; فشل إرسال الرسائل; فشل إرسال الرسائل; فشل إرسال الرسائل
+
+#
+noRecipientsTitle=إعادة توجيه البريد
+noRecipientsMessage=لم تحدد أي مستلمين. رجاء أدخل مستلمًا في خانة العناوين.
+
+#
+noMessagesTitle=إعادة توجيه البريد
+noMessagesMessage=لم تختر أية رسالة. من فضلك أضِف رسالة واحدة أو أكثر إلى حقل الرسالة.
+
diff --git a/chrome/locale/ar/mailredirect-prefs.dtd b/chrome/locale/ar/mailredirect-prefs.dtd
new file mode 100644
index 0000000..8a66ec9
--- /dev/null
+++ b/chrome/locale/ar/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "إعدادات ”إعادة توجيه البريد“">
+
+<!ENTITY copyToSentMails.label "أتريد وضع نسخة من البريد المُعاد توجيهه في مجلد البريد المُرسل؟">
+<!ENTITY copyToSentMails.accesskey "س">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "عند تحديد هذا الخيار، ستوضع نسخة من الرسالة المعاد توجيهها في مجلد المُرسَل. عند عدم تحديده، لن توضع نسخة من الرسالة في أي مجلد.\nلاحظ أن في حالة تحديد هذا الخيار و كانت إعدادات الحساب المستخدم تفعّل ”لا تحفظ الرسائل المُرسلة“، فلن تحفظ أي رسائل.">
+
+<!ENTITY addToForwardAs.label "أضِف ”إعادة التوجيه“ إلى قوائم وأزرار ”مرِّر كَ‍“">
+<!ENTITY addToForwardAs.accesskey "ض">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "بإضافة ”إعادة التوجيه“ إلى قوائم وأزرار ”مرِّر كَ‍“، ستكون جمعت كل إجراءات التمرير في عنصر واحد.\nيمكنك إزالة الأزرار من أشرطة الأدوات بتخصيصها، ويمكنك بالتأشير على الخيار أدناه إخفاء عناصر القائمة المنفصلة لأنها أصبحت مكرّرة.">
+
+<!ENTITY hideRedirectMenuitems.label "أخفِ عنصر القائمة ”إعادة التوجيه“ من قوائم الرسالة والتطبيق والقوائم السياقية">
+<!ENTITY hideRedirectMenuitems.accesskey "خ">
+<!ENTITY hideRedirectMenuitems.tooltip "يُخفي عناصر ”إعادة التوجيه“ المنفصلة في قوائم الرسالة والتطبيق والقوائم السياقية.">
+
+<!ENTITY concurrentConnections.label "عدد اتصالات SMTP المتزامنة:">
+<!ENTITY concurrentConnections.accesskey "ع">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "يحدد هذا الخيار عدد الاتصالات مع خادوم SMTP أثناء إرسال رسائلك. يتيح لك هذا تحسين أداء عملية الإرسال عندما تحتار إرسال عدد ضخم من الرسائل.\nلاحظ أن رقم صفر يعني عد تقييد عدد الاتصالات المتزامنة — لكن قد يؤثر هذا على ثبات خادوم SMTP، أو قد يفشل إرسال بعض الرسائل. في حال وجود مشاكل اجعل القيمة واحد.">
+
+<!ENTITY defaultRecipientsGroup.label "المستلمين المبدئيين">
+
+<!ENTITY defaultResendTo.label "إعادة إرسال-إلى:">
+<!ENTITY defaultResendTo.accesskey "د">
+<!ENTITY defaultResendTo.tooltip "قائمة عناوين بريد إلكتروني مفصولة بفاصلة.">
+
+<!ENTITY defaultResendCc.label "إعادة إرسال-نسخ:">
+<!ENTITY defaultResendCc.accesskey "ن">
+<!ENTITY defaultResendCc.tooltip "قائمة عناوين بريد إلكتروني مفصولة بفاصلة.">
+
+<!ENTITY defaultResendBcc.label "إعادة إرسال-نسخ عمياء:">
+<!ENTITY defaultResendBcc.accesskey "ع">
+<!ENTITY defaultResendBcc.tooltip "قائمة عناوين بريد إلكتروني مفصولة بفاصلة.">
+
+<!ENTITY defaultMode.label "الوضع المبدئي:">
+<!ENTITY defaultMode.accesskey "ئ">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "اختر طريقة إعادة توجيه الرسائل مبدئيا.\nيعمل هذا الإعداد إن لم تحدّد أي مستلم مبدئي.">
+<!ENTITY defaultModeResendTo.label "إعادة إرسال-إلى">
+<!ENTITY defaultModeResendCc.label "إعادة إرسال-نسخ">
+<!ENTITY defaultModeResendBcc.label "إعادة إرسال-نسخ عمياء">
+
+<!ENTITY debug.label "نقّح">
+<!ENTITY debug.accesskey "ن">
+<!ENTITY debug.tooltip "فعّل أو عطّل تنقيح امتداد إعادة توجيه البريد. ستُرسل السجلات إلى معراض الأعطال.">
+
+<!ENTITY saveConsoleContent.label2 "احفظ محتوى معراض الأعطال…">
+<!ENTITY saveConsoleContent.accesskey2 "ح">
+<!ENTITY sendViaEmail.label "أرسل عبر البريد الإلكتروني">
+<!ENTITY sendViaEmail.accesskey "س">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "إعادة توجيه البريد">
diff --git a/chrome/locale/ar/mailredirect-prefs.properties b/chrome/locale/ar/mailredirect-prefs.properties
new file mode 100644
index 0000000..15c1329
--- /dev/null
+++ b/chrome/locale/ar/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=إعادة توجيه البريد
+tempFileErrorDlogMessage=حدث خطأ أثناء إنشاء الملف المؤقت.
+
+saveFile2=احفظ محتوى معراض الأعطال
diff --git a/chrome/locale/ar/mailredirect.dtd b/chrome/locale/ar/mailredirect.dtd
new file mode 100644
index 0000000..e80924a
--- /dev/null
+++ b/chrome/locale/ar/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "أعِد التوجيه">
+<!ENTITY bounceCommand.accesskey "ت">
+<!ENTITY bounceCommand.tooltip "أعِد توجيه الرسائل المحدّدة">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "إعادة توجيه">
+<!ENTITY forwardAsRedirect.accesskey "ع">
+<!ENTITY forwardAsRedirect.tooltip "أعِد توجيه الرسالة المحددة">
diff --git a/chrome/locale/ar/mailredirect.properties b/chrome/locale/ar/mailredirect.properties
new file mode 100644
index 0000000..3bdf4c5
--- /dev/null
+++ b/chrome/locale/ar/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=إعادة توجيه البريد (Mail Redirect)
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=يُتيح لك إعادة توجيه رسائل البريد (أي إعادة إرسالها) إلى مستلمين آخرين.
diff --git a/chrome/locale/ar/msgHdrViewOverlay.dtd b/chrome/locale/ar/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..3cbed12
--- /dev/null
+++ b/chrome/locale/ar/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "أعِد التوجيه">
+<!ENTITY hdrMailredirectButton1.tooltip "أعِد توجيه هذه الرسالة">
diff --git a/chrome/locale/bg/mailredirect-compose.dtd b/chrome/locale/bg/mailredirect-compose.dtd
new file mode 100644
index 0000000..4572cb5
--- /dev/null
+++ b/chrome/locale/bg/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Преадресиране на писма">
+
+<!ENTITY fileMenu.label "Файл">
+<!ENTITY fileMenu.accesskey "Ф">
+<!ENTITY forwardBounce.label "Преадресиране">
+<!ENTITY forwardBounce.accesskey "р">
+<!ENTITY closeCmd.label "Затваряне">
+<!ENTITY closeCmd.accesskey "з">
+
+<!ENTITY viewMenu.label "Изглед">
+<!ENTITY viewMenu.accesskey "И">
+<!ENTITY viewToolbarsMenuNew.label "Ленти с инструменти">
+<!ENTITY viewToolbarsMenuNew.accesskey "Л">
+<!ENTITY menubarCmd.label "Лента с менюта">
+<!ENTITY menubarCmd.accesskey "м">
+
+<!ENTITY tasksMenu.label "Инструменти">
+<!ENTITY tasksMenu.accesskey "И">
+<!ENTITY messengerCmd.label "Поща и новинарски групи">
+<!ENTITY messengerCmd.accesskey "г">
+<!ENTITY addressBookCmd.label "Адресник">
+<!ENTITY addressBookCmd.accesskey "а">
+
+<!ENTITY bounceButton.label "Преадресиране">
+<!ENTITY bounceButton.tooltip "Преадресиране на писма">
+<!ENTITY addressButton.label "Адресник">
+<!ENTITY addressButton.tooltip "Отваря адресника">
+<!ENTITY throbberItem.title "Показател за действие">
+<!ENTITY throbber.tooltip "Към страницата на &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Настройки…">
+<!ENTITY customizeToolbar.accesskey "н">
+<!ENTITY showBounceToolbarCmd.label "Лента за преадресиране">
+<!ENTITY showBounceToolbarCmd.accesskey "п">
+<!ENTITY showStatusbarCmd.label "Лента за състоянието">
+<!ENTITY showStatusbarCmd.accesskey "с">
+
+<!ENTITY addressSidebar.label "Странична лента с контактите">
+<!ENTITY addressSidebar.accesskey "к">
+<!ENTITY addressesSidebarTitle.label "Контакти">
+<!ENTITY addressSidebarButton.label "Контакти">
+<!ENTITY addressSidebarButton.tooltip "Избиране на получател от адресника">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 10em;">
+
+<!ENTITY resendFromAddr.label "Преадр.-От:">
+<!ENTITY resendFromAddr.accesskey "о">
+
+<!ENTITY resendToAddr.label "Преадр.-До:">
+<!ENTITY resendCcAddr.label "Преадр.-Копие:">
+<!ENTITY resendBccAddr.label "Преадр.-Скрито:">
+
+<!ENTITY bounceMailsLabel.label "Следните писма ще бъдат преадресирани:">
+
+<!ENTITY subject.label "Тема">
+<!ENTITY sender.label "Подател">
+<!ENTITY date.label "Дата">
diff --git a/chrome/locale/bg/mailredirect-compose.properties b/chrome/locale/bg/mailredirect-compose.properties
new file mode 100644
index 0000000..7e013a5
--- /dev/null
+++ b/chrome/locale/bg/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Преадресиране на писма:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Преадресиране на писма
+initErrorDlogMessage=Възникна грешка при отваряне на прозореца на „Преадресиране на писма“. Опитайте отново.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Добавяне към полето Преадр.-До
+resendToContextMenuAccesskeyTB=д
+resendCcContextMenuLabelTB=Добавяне към полето Преадр.-Копие
+resendCcContextMenuAccesskeyTB=к
+resendBccContextMenuLabelTB=Добавяне към полето Преадр.-Скрито
+resendBccContextMenuAccesskeyTB=с
+resendToButtonLabel=Добавяне към Преадр.-До:
+resendToButtonAccesskey=б
+resendCcButtonLabel=Добавяне към Преадр.-Копие:
+resendCcButtonAccesskey=м
+resendBccButtonLabel=Добавяне към Преадр.-Скрито:
+resendBccButtonAccesskey=в
+resendToContextMenuLabelSM=Преадр.-До->
+resendToContextMenuAccesskeySM=д
+resendCcContextMenuLabelSM=Преадр.-Копие->
+resendCcContextMenuAccesskeySM=к
+resendBccContextMenuLabelSM=Преадр.-Скрито->
+resendBccContextMenuAccesskeySM=с
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Изпращане на съобщение;Изпращане на съобщения
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Сигурни ли сте, че сте готови да изпратите това съобщение?;Сигурни ли сте, че сте готови да изпратите тези съобщения?
+sendMessageCheckSendButtonLabel=Изпращане
+
+CheckMsg=Без ново показване на този диалогов прозорец.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Съобщението е успешно изпратено;Съобщенията са изпратени успешно
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Пропадна изпращането на съобщението;Пропадна изпращането на съобщенията
+
+#
+noRecipientsTitle=Преадресиране на писма
+noRecipientsMessage=Няма посочени получатели. Въведете получател в зоната за адресиране.
+
+#
+noMessagesTitle=Преадресиране на писма
+noMessagesMessage=Няма избрани писма. Моля, добавете едно или повече писма в областта за писане.
diff --git a/chrome/locale/bg/mailredirect-prefs.dtd b/chrome/locale/bg/mailredirect-prefs.dtd
new file mode 100644
index 0000000..2887f05
--- /dev/null
+++ b/chrome/locale/bg/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Настройки на Преадресиране на писма">
+
+<!ENTITY copyToSentMails.label "Копиране на преадресираните писма в папка Изпратени?">
+<!ENTITY copyToSentMails.accesskey "К">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Ако това поле е отметнато се прави копие от препратеното писмо в папка Изпратени. Ако полето не е отметнато не се прави копие.\nЗабележка: Ако полето е отметнато, но използваната за препращане сметка има настройка „да не запазва никакви изпратени писма“, тогава пак няма да бъде направено копие.">
+
+<!ENTITY addToForwardAs.label "Добавяне на Преадресиране към менютата и бутоните на Препращане като">
+<!ENTITY addToForwardAs.accesskey "Д">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Добавяйки Преадресиране към менютата и бутоните на „Препращане като“ групирате всички действия за пренасочване да едно място.\nМоже да премахнете бутоните от лентите с инструменти като ги персонилизирате или като отметнете долната отметка. Също може да скривате отделни излишни елементи от менютата.">
+
+<!ENTITY hideRedirectMenuitems.label "Скриване на меню Преаднесиране от контекстуалните менюта">
+<!ENTITY hideRedirectMenuitems.accesskey "С">
+<!ENTITY hideRedirectMenuitems.tooltip "Скриване на отделните елементи от меню Преаднесиране от контекстуалните менюта на съобщения и приложението.">
+
+<!ENTITY concurrentConnections.label "Брой на едновременните връзки към SMTP:">
+<!ENTITY concurrentConnections.accesskey "Б">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Тази настройка указва броя на отворените връзки към сървъра за SMTP при изпращане на писма. По този начин ще се съкрати времето за преадресиране на голям брой писма едновременно.\nЗабележка: Ако на параметъра зададете 0 (т.е. без ограничение на броя едновременно отворени връзки) имайте предвид, че това може да доведе до намаляване на стабилността на сървъра за SMTP или някои преадресирани писма да не бъдат изпратени. Ако има проблеми при преадресиране задайте стойност 1.">
+
+<!ENTITY defaultRecipientsGroup.label "Получатели по подразбиране">
+
+<!ENTITY defaultResendTo.label "Преадр.-До:">
+<!ENTITY defaultResendTo.accesskey "Д">
+<!ENTITY defaultResendTo.tooltip "Имейлите се разделят със запетая.">
+
+<!ENTITY defaultResendCc.label "Преадр.-Копие:">
+<!ENTITY defaultResendCc.accesskey "К">
+<!ENTITY defaultResendCc.tooltip "Имейлите се разделят със запетая.">
+
+<!ENTITY defaultResendBcc.label "Преадр.-Скрито:">
+<!ENTITY defaultResendBcc.accesskey "С">
+<!ENTITY defaultResendBcc.tooltip "Имейлите се разделят със запетая.">
+
+<!ENTITY defaultMode.label "Режим по подразбиране:">
+<!ENTITY defaultMode.accesskey "м">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Изберете как писмата да бъдат преадресирани по подразбиране.\nТази настройка влиза в сила, само когато няма избрани получатели по подразбиране.">
+<!ENTITY defaultModeResendTo.label "Преадр.-До">
+<!ENTITY defaultModeResendCc.label "Преадр.-Копие">
+<!ENTITY defaultModeResendBcc.label "Преадр.-Скрито">
+
+<!ENTITY debug.label "Отстраняване на дефекти">
+<!ENTITY debug.accesskey "д">
+<!ENTITY debug.tooltip "Включване/изключване на отстраняване на дефекти от разширението mailredirect. Дневниците с действията на разширението се пренасочват към конзолата за грешки.">
+
+<!ENTITY saveConsoleContent.label2 "Запазване на съдържанието на конзолата за грешки…">
+<!ENTITY saveConsoleContent.accesskey2 "З">
+<!ENTITY sendViaEmail.label "Изпращане по имейла">
+<!ENTITY sendViaEmail.accesskey "п">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Преадресиране на писма">
diff --git a/chrome/locale/bg/mailredirect-prefs.properties b/chrome/locale/bg/mailredirect-prefs.properties
new file mode 100644
index 0000000..1001bdd
--- /dev/null
+++ b/chrome/locale/bg/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Преадресиране на писма
+tempFileErrorDlogMessage=Грешка при запис във временния файл.
+
+saveFile2=Запис на съдържанието от конзолата с грешката
diff --git a/chrome/locale/bg/mailredirect.dtd b/chrome/locale/bg/mailredirect.dtd
new file mode 100644
index 0000000..7be29f6
--- /dev/null
+++ b/chrome/locale/bg/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Преадресиране">
+<!ENTITY bounceCommand.accesskey "с">
+<!ENTITY bounceCommand.tooltip "Преадресиране на избраните съобщения">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Преадресиране">
+<!ENTITY forwardAsRedirect.accesskey "П">
+<!ENTITY forwardAsRedirect.tooltip "Преадресиране на избраните съобщения">
diff --git a/chrome/locale/bg/mailredirect.properties b/chrome/locale/bg/mailredirect.properties
new file mode 100644
index 0000000..a50e135
--- /dev/null
+++ b/chrome/locale/bg/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Преадресиране на писма (Mail Redirect)
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Предоставя възможност за преадресиране на електронни писма до други получатели.
diff --git a/chrome/locale/bg/msgHdrViewOverlay.dtd b/chrome/locale/bg/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..c4670d4
--- /dev/null
+++ b/chrome/locale/bg/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Преадресиране">
+<!ENTITY hdrMailredirectButton1.tooltip "Преадресира писмото">
diff --git a/chrome/locale/ca/mailredirect-compose.dtd b/chrome/locale/ca/mailredirect-compose.dtd
new file mode 100644
index 0000000..bd298d4
--- /dev/null
+++ b/chrome/locale/ca/mailredirect-compose.dtd
@@ -0,0 +1,68 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "Fitxer">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Redirigir">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Tancar">
+<!ENTITY closeCmd.accesskey "T">
+
+<!ENTITY viewMenu.label "Veure">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Barra d'eines">
+<!ENTITY viewToolbarsMenuNew.accesskey "e">
+<!ENTITY menubarCmd.label "Barra de menú">
+<!ENTITY menubarCmd.accesskey "m">
+
+<!ENTITY tasksMenu.label "Eines">
+<!ENTITY tasksMenu.accesskey "E">
+<!ENTITY messengerCmd.label "Correu i grups de notícies">
+<!ENTITY messengerCmd.accesskey "C">
+<!ENTITY addressBookCmd.label "Llibreta d'adreces">
+<!ENTITY addressBookCmd.accesskey "a">
+
+<!ENTITY bounceButton.label "Redirigir">
+<!ENTITY bounceButton.tooltip "Redirigir missatges">
+<!ENTITY addressButton.label "Llibreta d'adreces">
+<!ENTITY addressButton.tooltip "Ves a la llibreta d'adreces">
+<!ENTITY throbberItem.title "Indicador d'activitat">
+<!ENTITY throbber.tooltip "Ves a la pàgina inicial de &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Personalitzar…">
+<!ENTITY customizeToolbar.accesskey "P">
+<!ENTITY showBounceToolbarCmd.label "Barra d'eines de redirecció">
+<!ENTITY showBounceToolbarCmd.accesskey "e">
+<!ENTITY showStatusbarCmd.label "Barra d'estat">
+<!ENTITY showStatusbarCmd.accesskey "s">
+
+<!ENTITY addressSidebar.label "Barra lateral de contactes">
+<!ENTITY addressSidebar.accesskey "o">
+<!ENTITY addressesSidebarTitle.label "Contactes">
+<!ENTITY addressSidebarButton.label "Contactes">
+<!ENTITY addressSidebarButton.tooltip "Trieu un destinatari a la llibreta d'adreces">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 13em;">
+
+<!ENTITY resendFromAddr.label "Reenviar-De:">
+<!ENTITY resendFromAddr.accesskey "R">
+
+<!ENTITY resendToAddr.label "Reenviar-A:">
+<!ENTITY resendCcAddr.label "Reenviar-Còpia:">
+<!ENTITY resendBccAddr.label "Reenviar-Còpia oculta:">
+<!ENTITY bounceMailsLabel.label "Es redireccionaran els següents correus:">
+
+<!ENTITY subject.label "Assumpte">
+<!ENTITY sender.label "Remitent">
+<!ENTITY date.label "Data">
diff --git a/chrome/locale/ca/mailredirect-compose.properties b/chrome/locale/ca/mailredirect-compose.properties
new file mode 100644
index 0000000..e0a2466
--- /dev/null
+++ b/chrome/locale/ca/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Mail Redirect:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Hi ha hagut un error en crear la finestra MailRedirect. Torneu a intentar-ho.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Afegir al camp Reenviar-A
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Afegir al camp Reenviar-Còpia
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Afegir al camp Reenviar-Còpia oculta
+resendBccContextMenuAccesskeyTB=o
+resendToButtonLabel=Afegir a Reenviar-A:
+resendToButtonAccesskey=A
+resendCcButtonLabel=Afegir a Reenviar-Còpia:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Afegir a Reenviar-Còpia oculta:
+resendBccButtonAccesskey=o
+resendToContextMenuLabelSM=Reenviar-A->
+resendToContextMenuAccesskeySM=A
+resendCcContextMenuLabelSM=Reenviar-Còpia->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Reenviar-Còpia oculta->
+resendBccContextMenuAccesskeySM=o
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Enviar missatge;Enviar missatges
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Segur que esteu preparat per a enviar aquest missatge?;Segur que esteu preparat per a enviar aquests missatges?
+sendMessageCheckSendButtonLabel=Enviar
+
+CheckMsg=No tornar a mostrar-me aquest quadre.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=S'ha enviat correctament el missatge;S'han enviat correctament els missatges
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Ha fallat l'enviament del missatge;Ha fallat l'enviament dels missatges
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=No s'han especificat destinataris. Entreu-ne un a la zona d'adreces.
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=No s'ha seleccionat cap missatge. Afegiu-ne un o més a la zona de missatges.
diff --git a/chrome/locale/ca/mailredirect-prefs.dtd b/chrome/locale/ca/mailredirect-prefs.dtd
new file mode 100644
index 0000000..25873c7
--- /dev/null
+++ b/chrome/locale/ca/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Configuració MailRedirect">
+
+<!ENTITY copyToSentMails.label "Desar una còpia del correu redirigit a la carpeta d'Enviats?">
+<!ENTITY copyToSentMails.accesskey "D">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Si activeu aquesta opció, es deixarà una còpia del missatge a la carpeta d'Enviats. Si no, no se'n deixarà enlloc.\nNota: si l'activeu però a la configuració del vostre compte hi indiqueu &quot;no desar mai els missatges enviats&quot;, tampoc no es desarà.">
+
+<!ENTITY addToForwardAs.label "Afegir Redirigir als menús i botons de Reenviar com">
+<!ENTITY addToForwardAs.accesskey "A">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "En afegir Redirigir als menús i botons Reenviar com, agrupareu totes les accions de reenviar sota un sol punt.\nPodeu suprimir els botons de les barres d'eines personalitzant-les i marcant l'opció de sota. Podeu ocultar els punts de menú separats perquè esdevenen redundants.">
+
+<!ENTITY hideRedirectMenuitems.label "Amagar el punt Redirigir als menús Missatge, Aplicació i contextuals">
+<!ENTITY hideRedirectMenuitems.accesskey "g">
+<!ENTITY hideRedirectMenuitems.tooltip "Amaga els punts de Redirigir separats dels menús Missatge, Aplicació i contextuals.">
+
+<!ENTITY concurrentConnections.label "Nombre de connexions SMTP concurrents:">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Especifica el nombre de connexions que es poden establir al servidor SMTP quan s'envien missatges. En general, això permet d'incrementar el rendiment del procés d'enviament quan redirigiu una gran quantitat de missatges.\nNota: si el poseu a zero, no hi haurà cap límit. Compte perquè això pot afectar l'estabilitat del servidor o pot fallar l'enviament d'alguns missatges. Si teniu cap problema, poseu-hi un u.">
+
+<!ENTITY defaultRecipientsGroup.label "Destinataris predeterminats">
+
+<!ENTITY defaultResendTo.label "Reenviar-A:">
+<!ENTITY defaultResendTo.accesskey "A">
+<!ENTITY defaultResendTo.tooltip "Llista separada per comes d'adreces de correu.">
+
+<!ENTITY defaultResendCc.label "Reenviar-Còpia:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Llista separada per comes d'adreces de correu.">
+
+<!ENTITY defaultResendBcc.label "Reenviar-Còpia oculta:">
+<!ENTITY defaultResendBcc.accesskey "o">
+<!ENTITY defaultResendBcc.tooltip "Llista separada per comes d'adreces de correu.">
+
+<!ENTITY defaultMode.label "Mode per defecte:">
+<!ENTITY defaultMode.accesskey "M">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Trieu com voleu redirigir els missatges per defecte.\nAquest paràmetre només té efecte quan no especifiqueu cap destinatari per defecte.">
+<!ENTITY defaultModeResendTo.label "Reenviar-A">
+<!ENTITY defaultModeResendCc.label "Reenviar-Còpia">
+<!ENTITY defaultModeResendBcc.label "Reenviar-Còpia oculta">
+
+<!ENTITY debug.label "Depurar">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Activar o desactivar la depuració de l'extensió MailRedirect. El registre és dirigit a la consola d'error.">
+
+<!ENTITY saveConsoleContent.label2 "Desar el contingut de la consola d'errors...">
+<!ENTITY saveConsoleContent.accesskey2 "D">
+<!ENTITY sendViaEmail.label "Enviar via correu">
+<!ENTITY sendViaEmail.accesskey "c">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/ca/mailredirect-prefs.properties b/chrome/locale/ca/mailredirect-prefs.properties
new file mode 100644
index 0000000..8d163cc
--- /dev/null
+++ b/chrome/locale/ca/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Error en gravar al fitxer temporal.
+
+saveFile2=Desar el contingut de la consola d'error
diff --git a/chrome/locale/ca/mailredirect.dtd b/chrome/locale/ca/mailredirect.dtd
new file mode 100644
index 0000000..5443163
--- /dev/null
+++ b/chrome/locale/ca/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Redirigir">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Redirigir els missatges seleccionats">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Redirigir">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Redirigir el missatge seleccionat">
diff --git a/chrome/locale/ca/mailredirect.properties b/chrome/locale/ca/mailredirect.properties
new file mode 100644
index 0000000..175f029
--- /dev/null
+++ b/chrome/locale/ca/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Permetre redirigir o "rebotar" missatges de correu a d'altres destinataris.
diff --git a/chrome/locale/ca/msgHdrViewOverlay.dtd b/chrome/locale/ca/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..aebabab
--- /dev/null
+++ b/chrome/locale/ca/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Redirigir">
+<!ENTITY hdrMailredirectButton1.tooltip "Redirigir aquest missatge">
diff --git a/chrome/locale/cs/mailredirect-compose.dtd b/chrome/locale/cs/mailredirect-compose.dtd
new file mode 100644
index 0000000..5b33ddd
--- /dev/null
+++ b/chrome/locale/cs/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "Soubor">
+<!ENTITY fileMenu.accesskey "S">
+<!ENTITY forwardBounce.label "Přesměrovat">
+<!ENTITY forwardBounce.accesskey "t">
+<!ENTITY closeCmd.label "Zavřít">
+<!ENTITY closeCmd.accesskey "Z">
+
+<!ENTITY viewMenu.label "Zobrazit">
+<!ENTITY viewMenu.accesskey "Z">
+<!ENTITY viewToolbarsMenuNew.label "Nástrojové lišty">
+<!ENTITY viewToolbarsMenuNew.accesskey "n">
+<!ENTITY menubarCmd.label "Lišta nabídky">
+<!ENTITY menubarCmd.accesskey "b">
+
+<!ENTITY tasksMenu.label "Nástroje">
+<!ENTITY tasksMenu.accesskey "N">
+<!ENTITY messengerCmd.label "Pošta a diskusní skupiny">
+<!ENTITY messengerCmd.accesskey "P">
+<!ENTITY addressBookCmd.label "Adresář">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Přesměrovat">
+<!ENTITY bounceButton.tooltip "Přesměruje zprávy">
+<!ENTITY addressButton.label "Adresář">
+<!ENTITY addressButton.tooltip "Přejde na adresář">
+<!ENTITY throbberItem.title "Ukazatel aktivity">
+<!ENTITY throbber.tooltip "Přejde na domovskou stránku aplikace &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Přizpůsobit…">
+<!ENTITY customizeToolbar.accesskey "z">
+<!ENTITY showBounceToolbarCmd.label "Lišta přesměrování">
+<!ENTITY showBounceToolbarCmd.accesskey "p">
+<!ENTITY showStatusbarCmd.label "Stavový řádek">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "Postranní lišta s kontakty">
+<!ENTITY addressSidebar.accesskey "k">
+<!ENTITY addressesSidebarTitle.label "Kontakty">
+<!ENTITY addressSidebarButton.label "Kontakty">
+<!ENTITY addressSidebarButton.tooltip "Vyberte příjemce z adresáře">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 14em;">
+
+<!ENTITY resendFromAddr.label "Přeposlat-Od:">
+<!ENTITY resendFromAddr.accesskey "O">
+
+<!ENTITY resendToAddr.label "Přeposlat-Komu:">
+<!ENTITY resendCcAddr.label "Přeposlat-Kopie:">
+<!ENTITY resendBccAddr.label "Přeposlat-Skrytá kopie:">
+
+<!ENTITY bounceMailsLabel.label "Následující zprávy budou přesměrovány:">
+
+<!ENTITY subject.label "Předmět">
+<!ENTITY sender.label "Odesílatel">
+<!ENTITY date.label "Datum">
diff --git a/chrome/locale/cs/mailredirect-compose.properties b/chrome/locale/cs/mailredirect-compose.properties
new file mode 100644
index 0000000..96f646b
--- /dev/null
+++ b/chrome/locale/cs/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Mail Redirect:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Při pokusu o otevření okna rozšíření MailRedirect došlo k chybě. Prosím zkuste to znovu.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=8
+
+resendToContextMenuLabelTB=Přidat do pole Přeposlat-Komu
+resendToContextMenuAccesskeyTB=P
+resendCcContextMenuLabelTB=Přidat do pole Přeposlat-Kopie
+resendCcContextMenuAccesskeyTB=K
+resendBccContextMenuLabelTB=Přidat do pole Přeposlat-Skrytá kopie
+resendBccContextMenuAccesskeyTB=S
+resendToButtonLabel=Přidat do Přeposlat-Komu:
+resendToButtonAccesskey=P
+resendCcButtonLabel=Přidat do Přeposlat-Kopie:
+resendCcButtonAccesskey=K
+resendBccButtonLabel=Přidat do Přeposlat-Skrytá kopie:
+resendBccButtonAccesskey=S
+resendToContextMenuLabelSM=Přeposlat-Komu->
+resendToContextMenuAccesskeySM=P
+resendCcContextMenuLabelSM=Přeposlat-Kopie->
+resendCcContextMenuAccesskeySM=K
+resendBccContextMenuLabelSM=Přeposlat-Skrytá kopie->
+resendBccContextMenuAccesskeySM=S
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Odeslat zprávu;Odeslat zprávy;Odeslat zprávy
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Opravdu chcete odeslat tuto zprávu?;Opravdu chcete odeslat tyto zprávy?;Opravdu chcete odeslat tyto zprávy?
+sendMessageCheckSendButtonLabel=Odeslat
+
+CheckMsg=Tento dialog příště nezobrazovat.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Zpráva úspěšně odeslána;Zprávy úspěšně odeslány;Zprávy úspěšně odeslány
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Zprávu se nepodařilo odeslat;Zprávy se nepodařilo odeslat;Zprávy se nepodařilo odeslat
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=Nejsou zadáni žádní adresáti. Prosím doplňte adresáty do pole pro adresu.
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=Nebyly vybrány žádné zprávy. Přidejte jednu nebo více zpráv do příslušné oblasti.
diff --git a/chrome/locale/cs/mailredirect-prefs.dtd b/chrome/locale/cs/mailredirect-prefs.dtd
new file mode 100644
index 0000000..f85c5dd
--- /dev/null
+++ b/chrome/locale/cs/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Možnosti rozšíření MailRedirect">
+
+<!ENTITY copyToSentMails.label "Uložit kopii přesměrované pošty od složky Odeslaná pošta?">
+<!ENTITY copyToSentMails.accesskey "c">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Pokud je tato volba zapnutá, kopie přesměrované zprávy se uloží do složky Odeslaná pošta. Pokud je tato volba vypnutá, přesměrované zprávy se nikam neukládají.\nPozn.: Pokud je tato volba zapnutá, ale zároveň je v Nastavení účtu/Kopie &amp; složky zvoleno Neukládat žádné kopie, kopie přesměrovaných zpráv se neuloží.">
+
+<!ENTITY addToForwardAs.label "Přidat Přesměrovat do nabídek a tlačítek Přeposlat jako">
+<!ENTITY addToForwardAs.accesskey "P">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Přidáte-li Přesměrovat do nabídek a tlačítek Přeposlat jako, seskupíte tím do jedné položky všechny činnosti týkající se přeposílání.\nPomocí přizpůsobení můžete odstranit nadbytečná tlačítka z nástrojových lišt a zaškrtnutím níže uvedené volby lze skrýt nadbytečné samostatné položky nabídek.">
+
+<!ENTITY hideRedirectMenuitems.label "Skrýt položku Přesměrovat z nabídek Zpráva, Aplikace a z místních nabídek">
+<!ENTITY hideRedirectMenuitems.accesskey "S">
+<!ENTITY hideRedirectMenuitems.tooltip "Skryje samostatnou položku Přesměrovat z nabídek Zpráva, Aplikace a z místních nabídek.">
+
+<!ENTITY concurrentConnections.label "Počet paralelních SMTP spojení:">
+<!ENTITY concurrentConnections.accesskey "P">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Volba určuje počet spojení, která budou naráz použita pro komunikaci se SMTP serverem při odesílání zpráv. Obecně vzato tím můžete urychlit odesílání, zvl. pokud provádíte přesměrování většího počtu zpráv.\nPři nastavení na 0 nebude počet současných spojení vůbec omezován - to může mít vliv na stabilitu SMTP serveru a na odesílání přesměrovaných zpráv. V případě problémů nastavte na hodnotu 1.">
+
+<!ENTITY defaultRecipientsGroup.label "Výchozí příjemci">
+
+<!ENTITY defaultResendTo.label "Přeposlat-Komu:">
+<!ENTITY defaultResendTo.accesskey "K">
+<!ENTITY defaultResendTo.tooltip "Seznam e-mailových adres oddělených čárkami.">
+
+<!ENTITY defaultResendCc.label "Přeposlat-Kopie:">
+<!ENTITY defaultResendCc.accesskey "p">
+<!ENTITY defaultResendCc.tooltip "Seznam e-mailových adres oddělených čárkami.">
+
+<!ENTITY defaultResendBcc.label "Přeposlat-Skrytá kopie:">
+<!ENTITY defaultResendBcc.accesskey "y">
+<!ENTITY defaultResendBcc.tooltip "Seznam e-mailových adres oddělených čárkami.">
+
+<!ENTITY defaultMode.label "Výchozí režim:">
+<!ENTITY defaultMode.accesskey "r">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Zvolte výchozí přesměrování zpráv.\nNastavení se uplatní pouze tehdy, nebudou-li uvedeni výchozí příjemci.">
+<!ENTITY defaultModeResendTo.label "Přeposlat-Komu">
+<!ENTITY defaultModeResendCc.label "Přeposlat-Kopie">
+<!ENTITY defaultModeResendBcc.label "Přeposlat-Skrytá kopie">
+
+<!ENTITY debug.label "Ladit">
+<!ENTITY debug.accesskey "d">
+<!ENTITY debug.tooltip "Zapnout/vypnout ladění rozšíření MailRedirect. Ladící hlášky jsou zapisovány do konzole JavaScriptu.">
+
+<!ENTITY saveConsoleContent.label2 "Uložit obsah chybové konzole…">
+<!ENTITY saveConsoleContent.accesskey2 "U">
+<!ENTITY sendViaEmail.label "Odeslat e-mailem">
+<!ENTITY sendViaEmail.accesskey "e">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/cs/mailredirect-prefs.properties b/chrome/locale/cs/mailredirect-prefs.properties
new file mode 100644
index 0000000..301fc5d
--- /dev/null
+++ b/chrome/locale/cs/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Chyba při zápisu do dočasného souboru.
+
+saveFile2=Uložit obsah chybové konzole
diff --git a/chrome/locale/cs/mailredirect.dtd b/chrome/locale/cs/mailredirect.dtd
new file mode 100644
index 0000000..e2bb68e
--- /dev/null
+++ b/chrome/locale/cs/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Přesměrovat">
+<!ENTITY bounceCommand.accesskey "t">
+<!ENTITY bounceCommand.tooltip "Přesměruje vybrané zprávy">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Přesměrovat">
+<!ENTITY forwardAsRedirect.accesskey "e">
+<!ENTITY forwardAsRedirect.tooltip "Přesměruje vybranou zprávu">
diff --git a/chrome/locale/cs/mailredirect.properties b/chrome/locale/cs/mailredirect.properties
new file mode 100644
index 0000000..863e512
--- /dev/null
+++ b/chrome/locale/cs/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Umožní přesměrovat e-mailové zprávy na ostatní příjemce.
diff --git a/chrome/locale/cs/msgHdrViewOverlay.dtd b/chrome/locale/cs/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..86d1b70
--- /dev/null
+++ b/chrome/locale/cs/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Přesměrovat">
+<!ENTITY hdrMailredirectButton1.tooltip "Přesměruje tuto zprávu">
diff --git a/chrome/locale/da/mailredirect-compose.dtd b/chrome/locale/da/mailredirect-compose.dtd
new file mode 100644
index 0000000..b9b3c50
--- /dev/null
+++ b/chrome/locale/da/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Omdirigering af mail">
+
+<!ENTITY fileMenu.label "Filer">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Omdiriger">
+<!ENTITY forwardBounce.accesskey "O">
+<!ENTITY closeCmd.label "Luk">
+<!ENTITY closeCmd.accesskey "L">
+
+<!ENTITY viewMenu.label "Vis">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Værktøjslinjer">
+<!ENTITY viewToolbarsMenuNew.accesskey "V">
+<!ENTITY menubarCmd.label "Menulinje">
+<!ENTITY menubarCmd.accesskey "e">
+
+<!ENTITY tasksMenu.label "Funktioner">
+<!ENTITY tasksMenu.accesskey "u">
+<!ENTITY messengerCmd.label "Mail &amp; nyhedsgrupper">
+<!ENTITY messengerCmd.accesskey "M">
+<!ENTITY addressBookCmd.label "Adressebog">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Omdiriger">
+<!ENTITY bounceButton.tooltip "Omdiriger meddelelser">
+<!ENTITY addressButton.label "Adressebog">
+<!ENTITY addressButton.tooltip "Gå til adressebogen">
+<!ENTITY throbberItem.title "Aktivitetsindikator">
+<!ENTITY throbber.tooltip "Gå til &vendorShortName;s hjemmeside">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Tilpas…">
+<!ENTITY customizeToolbar.accesskey "T">
+<!ENTITY showBounceToolbarCmd.label "Omdirigeringslinje">
+<!ENTITY showBounceToolbarCmd.accesskey "O">
+<!ENTITY showStatusbarCmd.label "Statuslinje">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "Kontakter">
+<!ENTITY addressSidebar.accesskey "K">
+<!ENTITY addressesSidebarTitle.label "Kontakter">
+<!ENTITY addressSidebarButton.label "Kontakter">
+<!ENTITY addressSidebarButton.tooltip "Vælg en modtager fra en adressebog">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 16em;">
+
+<!ENTITY resendFromAddr.label "Omdiriger fra:">
+<!ENTITY resendFromAddr.accesskey "O">
+
+<!ENTITY resendToAddr.label "Omdiriger til:">
+<!ENTITY resendCcAddr.label "Omdiriger kopi til (Cc):">
+<!ENTITY resendBccAddr.label "Omdiriger skjult kopi til (Bcc):">
+
+<!ENTITY bounceMailsLabel.label "Følgende meddelelser vil blive omdirigeret:">
+
+<!ENTITY subject.label "Emne">
+<!ENTITY sender.label "Fra">
+<!ENTITY date.label "Dato">
diff --git a/chrome/locale/da/mailredirect-compose.properties b/chrome/locale/da/mailredirect-compose.properties
new file mode 100644
index 0000000..5f9ca4f
--- /dev/null
+++ b/chrome/locale/da/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Omdirigering af mail:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Omdirigering af mail
+initErrorDlogMessage=Der opstod en fejl, da MailRedirect-vinduet skulle oprettes. Prøv igen.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Tilføj i feltet Omdiriger til
+resendToContextMenuAccesskeyTB=T
+resendCcContextMenuLabelTB=Tilføj i feltet Omdiriger kopi til
+resendCcContextMenuAccesskeyTB=O
+resendBccContextMenuLabelTB=Tilføj i feltet Omdiriger skjult kopi til
+resendBccContextMenuAccesskeyTB=K
+resendToButtonLabel=Omdiriger til:
+resendToButtonAccesskey=T
+resendCcButtonLabel=Omdiriger kopi til:
+resendCcButtonAccesskey=O
+resendBccButtonLabel=Omdiriger skjult kopi til:
+resendBccButtonAccesskey=K
+resendToContextMenuLabelSM=Omdiriger til->
+resendToContextMenuAccesskeySM=T
+resendCcContextMenuLabelSM=Omdiriger kopi til->
+resendCcContextMenuAccesskeySM=O
+resendBccContextMenuLabelSM=Omdiriger skjult kopi til->
+resendBccContextMenuAccesskeySM=K
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Send meddelelse;Send meddelelser
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Er du sikker på, at du er klar til at sende denne meddelelse?;Er du sikker på, at du er klar til at sende disse meddelelser?
+sendMessageCheckSendButtonLabel=Send
+
+CheckMsg=Vis mig ikke den dialogboks igen.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Meddelelse sendt korrekt;Meddelelser sendt korrekt
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Afsendelse mislykkedes;Afsendelse mislykkedes
+
+#
+noRecipientsTitle=Omdirigering af mail
+noRecipientsMessage=Ingen modtagere blev angivet. Indtast en modtager i adressefeltet.
+
+#
+noMessagesTitle=Omdirigering af mail
+noMessagesMessage=Ingen meddelelser er valgt. Tilføj en eller flere meddelelser til meddelelsesområdet.
diff --git a/chrome/locale/da/mailredirect-prefs.dtd b/chrome/locale/da/mailredirect-prefs.dtd
new file mode 100644
index 0000000..d2ffaa6
--- /dev/null
+++ b/chrome/locale/da/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "MailRedirect - Indstillinger">
+
+<!ENTITY copyToSentMails.label "Anbring en kopi af omdirigeret mail i mappen Sendt?">
+<!ENTITY copyToSentMails.accesskey "A">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Hvis denne indstilling er valgt, anbringes en kopi af en omdirigeret meddelelse i mappen Sendt. Hvis indstillingen ikke er valgt, anbringes der ingen kopi af en omdirigeret meddelelse i nogen mapper.\nBemærk: Hvis denne indstilling er valgt og dine indstillinger for kontoen, der bruges til omdirigering, er sat til 'ikke at gemme sendte meddelelser', gemmes der heller ingen kopi af en omdirigeret meddelelse.">
+
+<!ENTITY addToForwardAs.label "Tilføj ‘Omdiriger’ til menuen ‘Videresend som’ og knapper">
+<!ENTITY addToForwardAs.accesskey "f">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Ved at tilføje ‘Omdiriger’ til menuerne ‘Videresend som’ og til knapper, samler du alle videresend-handlinger under ét punkt.\nDu kan fjerne knapperne fra værktøjslinjerne ved at tilpasse dem, og ved at sætte flueben i indstillingen nedenunder, kan du skjule menupunkterne, da der er blevet overflødige.">
+
+<!ENTITY hideRedirectMenuitems.label "Skjul menupunktet ‘Omdiriger’ i menuen Meddelelse, programmenuen og genvejsmenuer">
+<!ENTITY hideRedirectMenuitems.accesskey "k">
+<!ENTITY hideRedirectMenuitems.tooltip "Skjuler menupunktet ‘Omdiriger’ i menuen Meddelelse, i programmenuen og i genvejsmenuer.">
+
+<!ENTITY concurrentConnections.label "Antal samtidige SMTP-forbindelser:">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Indstillingen angiver antallet af forbindelser, der vil blive etableret til din SMTP-server, når meddelelser sendes. Generelt giver dette dig mulighed for at forbedre ydeevnen af afsendelsesprocessen, når du vælger at omdirigere mange meddelelser.\nBemærk: Hvis du sætter værdien til nul, vil der ikke være nogle begrænsninger af samtidige forbindelser. Vær opmærksom på, at det kan have indflydelse på din SMTP-servers stabilitet eller afsendelse af nogle meddelelser kan mislykkes. I tilfælde af problemer, sæt værdien til en.">
+
+<!ENTITY defaultRecipientsGroup.label "Standardmodtagere">
+
+<!ENTITY defaultResendTo.label "Omdiriger til:">
+<!ENTITY defaultResendTo.accesskey "t">
+<!ENTITY defaultResendTo.tooltip "Kommasepareret liste med mailadresser.">
+
+<!ENTITY defaultResendCc.label "Omdiriger kopi til (Cc):">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Kommasepareret liste med mailadresser.">
+
+<!ENTITY defaultResendBcc.label "Omdiriger skjult kopi til (Bcc):">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Kommasepareret liste med mailadresser.">
+
+<!ENTITY defaultMode.label "Standardtilstand:">
+<!ENTITY defaultMode.accesskey "S">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Vælg, hvordan du vil omdirigere meddelelser som standard.\nDenne indstilling virker kun, når du ikke har angivet nogle standardmodtagere.">
+<!ENTITY defaultModeResendTo.label "Omdiriger til">
+<!ENTITY defaultModeResendCc.label "Omdiriger kopi til (Cc)">
+<!ENTITY defaultModeResendBcc.label "Omdiriger skjult kopi til (Bcc)">
+
+<!ENTITY debug.label "Debug">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Slå fejlfinding til/fra for udvidelsen MailRedirect. Log sendes til fejlkonsollen.">
+
+<!ENTITY saveConsoleContent.label2 "Gem indholdet af fejlkonsollen…">
+<!ENTITY saveConsoleContent.accesskey2 "G">
+<!ENTITY sendViaEmail.label "Send som mail">
+<!ENTITY sendViaEmail.accesskey "m">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/da/mailredirect-prefs.properties b/chrome/locale/da/mailredirect-prefs.properties
new file mode 100644
index 0000000..5d2cefc
--- /dev/null
+++ b/chrome/locale/da/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Fejl under skrivning af midlertidig fil.
+
+saveFile2=Gem indholdet af fejlkonsollen
diff --git a/chrome/locale/da/mailredirect.dtd b/chrome/locale/da/mailredirect.dtd
new file mode 100644
index 0000000..b9f3ebf
--- /dev/null
+++ b/chrome/locale/da/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Omdiriger">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Omdiriger valgte meddelelser">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Omdiriger">
+<!ENTITY forwardAsRedirect.accesskey "O">
+<!ENTITY forwardAsRedirect.tooltip "Omdiriger valgt meddelelse">
diff --git a/chrome/locale/da/mailredirect.properties b/chrome/locale/da/mailredirect.properties
new file mode 100644
index 0000000..bd617cd
--- /dev/null
+++ b/chrome/locale/da/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Giver mulighed for at omdirigere (også kendt som "remail") meddelelser til andre modtagere.
diff --git a/chrome/locale/da/msgHdrViewOverlay.dtd b/chrome/locale/da/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..cfb3894
--- /dev/null
+++ b/chrome/locale/da/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Omdiriger">
+<!ENTITY hdrMailredirectButton1.tooltip "Omdiriger denne meddelelse">
diff --git a/chrome/locale/de/mailredirect-compose.dtd b/chrome/locale/de/mailredirect-compose.dtd
new file mode 100644
index 0000000..26836a4
--- /dev/null
+++ b/chrome/locale/de/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Nachricht umleiten">
+
+<!ENTITY fileMenu.label "Datei">
+<!ENTITY fileMenu.accesskey "D">
+<!ENTITY forwardBounce.label "Umleiten">
+<!ENTITY forwardBounce.accesskey "U">
+<!ENTITY closeCmd.label "Schließen">
+<!ENTITY closeCmd.accesskey "c">
+
+<!ENTITY viewMenu.label "Ansicht">
+<!ENTITY viewMenu.accesskey "A">
+<!ENTITY viewToolbarsMenuNew.label "Symbolleisten">
+<!ENTITY viewToolbarsMenuNew.accesskey "y">
+<!ENTITY menubarCmd.label "Menüleiste">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Extras">
+<!ENTITY tasksMenu.accesskey "x">
+<!ENTITY messengerCmd.label "Hauptfenster">
+<!ENTITY messengerCmd.accesskey "H">
+<!ENTITY addressBookCmd.label "Adressbuch">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Umleiten">
+<!ENTITY bounceButton.tooltip "Nachricht umleiten">
+<!ENTITY addressButton.label "Adressbuch">
+<!ENTITY addressButton.tooltip "Adressbuch öffnen">
+<!ENTITY throbberItem.title "Aktivitätsindikator">
+<!ENTITY throbber.tooltip "&vendorShortName;-Homepage aufrufen">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Anpassen…">
+<!ENTITY customizeToolbar.accesskey "A">
+<!ENTITY showBounceToolbarCmd.label "Funktionen">
+<!ENTITY showBounceToolbarCmd.accesskey "o">
+<!ENTITY showStatusbarCmd.label "Statusleiste">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "Kontakte-Sidebar">
+<!ENTITY addressSidebar.accesskey "o">
+<!ENTITY addressesSidebarTitle.label "Kontakte">
+<!ENTITY addressSidebarButton.label "Kontakte">
+<!ENTITY addressSidebarButton.tooltip "Kontakte-Sidebar ein-/ausblenden">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 10em;">
+
+<!ENTITY resendFromAddr.label "Umleiten-Von:">
+<!ENTITY resendFromAddr.accesskey "V">
+
+<!ENTITY resendToAddr.label "Umleiten-An:">
+<!ENTITY resendCcAddr.label "Umleiten-CC:">
+<!ENTITY resendBccAddr.label "Umleiten-BCC:">
+
+<!ENTITY bounceMailsLabel.label "Folgende Nachrichten werden umgeleitet:">
+
+<!ENTITY subject.label "Betreff">
+<!ENTITY sender.label "Absender">
+<!ENTITY date.label "Datum">
diff --git a/chrome/locale/de/mailredirect-compose.properties b/chrome/locale/de/mailredirect-compose.properties
new file mode 100644
index 0000000..e0a051a
--- /dev/null
+++ b/chrome/locale/de/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Nachricht umleiten:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Das Mail-Redirect-Fenster konnte nicht geöffnet werden, da ein Fehler aufgetreten ist. Bitte versuchen Sie es nochmals.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Zu Umleiten-An-Feld hinzufügen
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Zu Umleiten-CC-Feld hinzufügen
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Zu Umleiten-BCC-Feld hinzufügen
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=Zu Umleiten-An hinzufügen:
+resendToButtonAccesskey=n
+resendCcButtonLabel=Zu Umleiten-CC hinzufügen:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Zu Umleiten-BCC hinzufügen:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=Umleiten-An->
+resendToContextMenuAccesskeySM=T
+resendCcContextMenuLabelSM=Umleiten-CC->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Umleiten-BCC->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Nachricht senden;Nachrichten senden
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Soll die Nachricht jetzt gesendet werden?;Sollen die Nachrichten jetzt gesendet werden?
+sendMessageCheckSendButtonLabel=Senden
+
+CheckMsg=Diesen Dialog nicht mehr anzeigen
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Nachricht erfolgreich gesendet;Nachrichten erfolgreich gesendet
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Senden der Nachricht fehlgeschlagen;Senden der Nachrichten fehlgeschlagen
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=Es wurden keine Empfänger angegeben. Bitte geben Sie mindestens einen Empfänger in die Empfängerliste ein.
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=Es wurden keine Nachrichten gelöscht. Bitte fügen Sie eine oder mehrere Nachrichten zum Nachrichtenbereich hinzu.
diff --git a/chrome/locale/de/mailredirect-prefs.dtd b/chrome/locale/de/mailredirect-prefs.dtd
new file mode 100644
index 0000000..f66259e
--- /dev/null
+++ b/chrome/locale/de/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "MailRedirect - Einstellungen">
+
+<!ENTITY copyToSentMails.label "Kopie umgeleiteter Nachricht im Ordner 'Gesendet' ablegen">
+<!ENTITY copyToSentMails.accesskey "K">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Wenn ausgewählt, wird eine Kopie der umgeleiteten Nachricht im Ordner 'Gesendet' abgelegt. Wenn nicht ausgewählt, wird keine Kopie gespeichert.\nHinweis: Wenn in den allgemeinen Konten-Einstellungen gewählt wurde, keine Kopien zu speichern, dann werden trotz der hier aktivierten Option keine Kopien von umgeleiteten Nachrichten gespeichert.">
+
+<!ENTITY addToForwardAs.label "Füge 'Umleitung' zu den Menüs + Schaltflächen von 'Weiterleiten als' hinzu">
+<!ENTITY addToForwardAs.accesskey "F">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Wenn Sie 'Umleitung' zu den Menüs und Schaltflächen für 'Weiterleiten als' hinzufügen, werden diese Funktionen gemeinsam gruppiert.\nSie können die zusätzlichen Schaltflächen per 'Anpassen' aus der Symbolleiste entfernen und durch Aktivieren der folgenden Option die separaten Menüeinträge ausblenden, da diese dann überflüssig sind.">
+
+<!ENTITY hideRedirectMenuitems.label "Blende die separaten Menüpunkte in Nachrichten-, Anwendungs- und Kontextmenüs aus">
+<!ENTITY hideRedirectMenuitems.accesskey "n">
+<!ENTITY hideRedirectMenuitems.tooltip "Entfernt die doppelten und somit unnötigen separaten Umleitung-Menüpunkte aus Nachrichten-, Anwendungs- und den Kontextmenüs.">
+
+<!ENTITY concurrentConnections.label "Anzahl gleichzeitiger SMTP-Verbindungen:">
+<!ENTITY concurrentConnections.accesskey "z">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Diese Option bestimmt die Anzahl der gleichzeitigen Verbindungen mit dem Postausgang-Server (SMTP), wenn mehrere Nachrichten umgeleitet werden. Wenn sehr viele Nachrichten umgeleitet werden, kann dies die Geschwindigkeit erhöhen.\nHinweis: Wenn Sie die Anzahl auf 0 setzen, wird die Anzahl der gleichzeitigen Verbindungen nicht begrenzt. Dies kann aber zu Problemen führen, sodass einzelne Nachrichten nicht gesendet werden können. Wenn Probleme auftreten, setzen Sie die Anzahl bitte auf 1.">
+
+<!ENTITY defaultRecipientsGroup.label "Voreingestellte Empfänger">
+
+<!ENTITY defaultResendTo.label "Umleiten-An:">
+<!ENTITY defaultResendTo.accesskey "A">
+<!ENTITY defaultResendTo.tooltip "Komma-separierte Liste von E-Mail-Adressen">
+
+<!ENTITY defaultResendCc.label "Umleiten-CC:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Komma-separierte Liste von E-Mail-Adressen">
+
+<!ENTITY defaultResendBcc.label "Umleiten-BCC:">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Komma-separierte Liste von E-Mail-Adressen">
+
+<!ENTITY defaultMode.label "Standardmodus:">
+<!ENTITY defaultMode.accesskey "S">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Wählen Sie, wie die Nachrichten standardmäßig umgeleitet werden sollen.\nDiese Einstellung ist nur aktiv, wenn keine voreingestellten Empfänger festgelegt sind.">
+<!ENTITY defaultModeResendTo.label "Umleiten-An">
+<!ENTITY defaultModeResendCc.label "Umleiten-CC">
+<!ENTITY defaultModeResendBcc.label "Umleiten-BCC">
+
+<!ENTITY debug.label "Fehlersuche aktivieren">
+<!ENTITY debug.accesskey "v">
+<!ENTITY debug.tooltip "An-/Abschalten des Debuggings für die Umleitungserweiterung. Logs werden in die Fehlerkonsole geschrieben.">
+
+<!ENTITY saveConsoleContent.label2 "Inhalt der Fehlerkonsole speichern…">
+<!ENTITY saveConsoleContent.accesskey2 "h">
+<!ENTITY sendViaEmail.label "Als E-Mail versenden">
+<!ENTITY sendViaEmail.accesskey "E">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Nachricht umleiten">
diff --git a/chrome/locale/de/mailredirect-prefs.properties b/chrome/locale/de/mailredirect-prefs.properties
new file mode 100644
index 0000000..0fc603a
--- /dev/null
+++ b/chrome/locale/de/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Fehler beim Schreiben einer temporären Datei.
+
+saveFile2=Inhalt der Fehlerkonsole speichern
diff --git a/chrome/locale/de/mailredirect.dtd b/chrome/locale/de/mailredirect.dtd
new file mode 100644
index 0000000..12be219
--- /dev/null
+++ b/chrome/locale/de/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Umleiten">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Ausgewählte Nachrichten umleiten">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Umleitung">
+<!ENTITY forwardAsRedirect.accesskey "U">
+<!ENTITY forwardAsRedirect.tooltip "Ausgewählte Nachricht umleiten">
diff --git a/chrome/locale/de/mailredirect.properties b/chrome/locale/de/mailredirect.properties
new file mode 100644
index 0000000..ff54fcf
--- /dev/null
+++ b/chrome/locale/de/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Erlaubt das Umleiten von E-Mails zu anderen Empfängern
diff --git a/chrome/locale/de/msgHdrViewOverlay.dtd b/chrome/locale/de/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..747a78c
--- /dev/null
+++ b/chrome/locale/de/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Umleiten">
+<!ENTITY hdrMailredirectButton1.tooltip "Nachricht umleiten">
diff --git a/chrome/locale/el/mailredirect-compose.dtd b/chrome/locale/el/mailredirect-compose.dtd
new file mode 100644
index 0000000..395a8f2
--- /dev/null
+++ b/chrome/locale/el/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Ανακατεύθυνση e-mail">
+
+<!ENTITY fileMenu.label "Αρχείο">
+<!ENTITY fileMenu.accesskey "Α">
+<!ENTITY forwardBounce.label "Ανακατεύθυνση">
+<!ENTITY forwardBounce.accesskey "τ">
+<!ENTITY closeCmd.label "Κλείσιμο">
+<!ENTITY closeCmd.accesskey "Κ">
+
+<!ENTITY viewMenu.label "Προβολή">
+<!ENTITY viewMenu.accesskey "Π">
+<!ENTITY viewToolbarsMenuNew.label "Γραμμές εργαλείων">
+<!ENTITY viewToolbarsMenuNew.accesskey "Γ">
+<!ENTITY menubarCmd.label "Γραμμή μενού">
+<!ENTITY menubarCmd.accesskey "Μ">
+
+<!ENTITY tasksMenu.label "Εργαλεία">
+<!ENTITY tasksMenu.accesskey "Ε">
+<!ENTITY messengerCmd.label "Αλληλογραφία &amp; ομάδες ειδήσεων">
+<!ENTITY messengerCmd.accesskey "Α">
+<!ENTITY addressBookCmd.label "Βιβλίο διευθύνσεων">
+<!ENTITY addressBookCmd.accesskey "Δ">
+
+<!ENTITY bounceButton.label "Ανακατεύθυνση">
+<!ENTITY bounceButton.tooltip "Ανακατεύθυνση μηνυμάτων">
+<!ENTITY addressButton.label "Βιβλίο διευθύνσεων">
+<!ENTITY addressButton.tooltip "Μετάβαση στο βιβλίο διευθύνσεων">
+<!ENTITY throbberItem.title "Δείκτης δραστηριότητας">
+<!ENTITY throbber.tooltip "Μετάβαση στην αρχική σελίδα του &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Προσαρμογή…">
+<!ENTITY customizeToolbar.accesskey "Π">
+<!ENTITY showBounceToolbarCmd.label "Γραμμή εργαλείων ανακατεύθυνσης">
+<!ENTITY showBounceToolbarCmd.accesskey "ρ">
+<!ENTITY showStatusbarCmd.label "Γραμμή κατάστασης">
+<!ENTITY showStatusbarCmd.accesskey "Κ">
+
+<!ENTITY addressSidebar.label "Πλευρική γραμμή επαφών">
+<!ENTITY addressSidebar.accesskey "π">
+<!ENTITY addressesSidebarTitle.label "Επαφές">
+<!ENTITY addressSidebarButton.label "Επαφές">
+<!ENTITY addressSidebarButton.tooltip "Επιλέξτε έναν παραλήπτη από το βιβλίο διευθύνσεων">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 9em;">
+
+<!ENTITY resendFromAddr.label "Εκ νέου αποστολή-Από:">
+<!ENTITY resendFromAddr.accesskey "Ε">
+
+<!ENTITY resendToAddr.label "Εκ νέου αποστολή-Προς:">
+<!ENTITY resendCcAddr.label "Εκ νέου αποστολή-Κοινοποίηση:">
+<!ENTITY resendBccAddr.label "Εκ νέου αποστολή-Κρυφή κοινοποίηση:">
+
+<!ENTITY bounceMailsLabel.label "Τα ακόλουθα μηνύματα θα ανακατευθυνθούν:">
+
+<!ENTITY subject.label "Θέμα">
+<!ENTITY sender.label "Αποστολέας">
+<!ENTITY date.label "Ημερομηνία">
diff --git a/chrome/locale/el/mailredirect-compose.properties b/chrome/locale/el/mailredirect-compose.properties
new file mode 100644
index 0000000..3af3004
--- /dev/null
+++ b/chrome/locale/el/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Ανακατεύθυνση e-mail:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Προέκυψε σφάλμα κατά τη δημιουργία παραθύρου MailRedirect, Παρακαλώ δοκιμάστε ξανά.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Προσθήκη στο πεδίο Εκ νέου αποστολή-Προς
+resendToContextMenuAccesskeyTB=Π
+resendCcContextMenuLabelTB=Προσθήκη στο πεδίο Εκ νέου αποστολή-Κοινοποίηση
+resendCcContextMenuAccesskeyTB=Κ
+resendBccContextMenuLabelTB=Προσθήκη στο πεδίο Εκ νέου αποστολή-Κρυφή κοινοποίηση
+resendBccContextMenuAccesskeyTB=Ρ
+resendToButtonLabel=Προσθήκη στο Εκ νέου αποστολή-Προς:
+resendToButtonAccesskey=Π
+resendCcButtonLabel=Προσθήκη στο Εκ νέου αποστολή-Κοινοποίηση:
+resendCcButtonAccesskey=Κ
+resendBccButtonLabel=Προσθήκη στο Εκ νέου αποστολή-Κρυφή κοινοποίηση:
+resendBccButtonAccesskey=Ρ
+resendToContextMenuLabelSM=Εκ νέου αποστολή-Προς->
+resendToContextMenuAccesskeySM=Π
+resendCcContextMenuLabelSM=Εκ νέου αποστολή-Κοινοποίηση->
+resendCcContextMenuAccesskeySM=Κ
+resendBccContextMenuLabelSM=Εκ νέου αποστολή-Κρυφή κοινοποίηση->
+resendBccContextMenuAccesskeySM=Ρ
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Αποστολή μηνύματος;Αποστολή μηνυμάτων
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Θέλετε σίγουρα να στείλετε αυτό το μήνυμα;;Θέλετε σίγουρα να στείλετε αυτά τα μηνύματα;
+sendMessageCheckSendButtonLabel=Αποστολή
+
+CheckMsg=Να μην εμφανιστεί ξανά αυτό το πλαίσιο διαλόγου.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Το μήνυμα απεστάλη με επιτυχία;Τα μηνύματα απεστάλησαν με επιτυχία
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Η αποστολή του μηνύματος απέτυχε;Η αποστολή των μηνυμάτων απέτυχε
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=Δεν καθορίστηκαν παραλήπτες. Παρακαλώ εισάγετε έναν παραλήπτη στην περιοχή διευθύνσεων.
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=Δεν επιλέχθηκαν μηνύματα. Παρακαλώ προσθέστε ένα ή περισσότερα μηνύματα στην περιοχή μηνύματος.
diff --git a/chrome/locale/el/mailredirect-prefs.dtd b/chrome/locale/el/mailredirect-prefs.dtd
new file mode 100644
index 0000000..1238c3f
--- /dev/null
+++ b/chrome/locale/el/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Ρυθμίσεις MailRedirect">
+
+<!ENTITY copyToSentMails.label "Τοποθέτηση ενός αντιγράφου του ανακατευθυνόμενου e-mail στο φάκελο &quot;Απεσταλμένα&quot;;">
+<!ENTITY copyToSentMails.accesskey "Τ">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Αν αυτή η επιλογή είναι ενεργή, ένα αντίγραφο του ανακατευθυνόμενου μηνύματος θα τοποθετείται στο φάκελο &quot;Απεσταλμένα&quot;. Αν αυτή η επιλογή είναι ανενεργή, το ανακατευθυνόμενο μήνυμα δεν θα αντιγράφεται σε κανένα φάκελο.\nΣημείωση: Αν αυτή η επιλογή είναι ενεργή και ο λογαριασμός που χρησιμοποιείται για ανακατεύθυνση έχει ρυθμιστεί ώστε να 'μην αποθηκεύει απεσταλμένα μηνύματα', δεν θα αποθηκεύονται αντίγραφα των ανακατευθυνόμενων μηνυμάτων.">
+
+<!ENTITY addToForwardAs.label "Προσθήκη στοιχείου &quot;Ανακατεύθυνση&quot; στα μενού και κουμπιά &quot;Προώθηση ως&quot;">
+<!ENTITY addToForwardAs.accesskey "θ">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Προσθέτοντας το στοιχείο &quot;Ανακατεύθυνση&quot; στα μενού και τα κουμπιά &quot;Προώθηση ως&quot;, μπορείτε να ομαδοποιήσετε όλες τις ενέργειες προώθησης κάτω από ένα στοιχείο.\nΜπορείτε να αφαιρέσετε τα κουμπιά από τις εργαλειοθήκες προσαρμόζοντάς τα και με την παρακάτω επιλογή, μπορείτε να αποκρύψετε τα ξεχωριστά στοιχεία μενού επειδή έχουν καταστεί περιττά.">
+
+<!ENTITY hideRedirectMenuitems.label "Απόκρυψη στοιχείου μενού &quot;Ανακατεύθυνση&quot; από μήνυμα, εφαρμογή και μενού περιεχομένου">
+<!ENTITY hideRedirectMenuitems.accesskey "κ">
+<!ENTITY hideRedirectMenuitems.tooltip "Αποκρύπτει τα ξεχωριστά στοιχεία μενού &quot;Ανακατεύθυνση&quot; από μήνυμα, εφαρμογή και μενού περιεχομένου.">
+
+<!ENTITY concurrentConnections.label "Αριθμός ταυτόχρονων συνδέσεων SMTP:">
+<!ENTITY concurrentConnections.accesskey "δ">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Η επιλογή καθορίζει τον αριθμό των συνδέσεων που θα δημιουργηθούν στο διακομιστή SMTP σας κατά την αποστολή μηνυμάτων. Γενικά, αυτό σάς επιτρέπει να αυξήσετε την απόδοση της διαδικασίας αποστολής όταν επιλέγετε να ανακατευθύνετε ένα μεγάλο αριθμό μηνυμάτων.\nΣημείωση: Αν ρυθμίσετε αυτή την παράμετρο σε μηδέν, δεν θα υπάρχει όριο ταυτόχρονων συνδέσεων - να σημειωθεί ότι αυτό θα μπορούσε να επηρεάσει την σταθερότητα του διακομιστή SMTP σας ή η αποστολή ορισμένων μηνυμάτων θα μπορούσε να αποτύχει. Σε περίπτωση προβλήματος, ορίσετε αυτή την τιμή σε ένα.">
+
+<!ENTITY defaultRecipientsGroup.label "Προεπιλεγμένοι παραλήπτες">
+
+<!ENTITY defaultResendTo.label "Εκ νέου αποστολή-Προς:">
+<!ENTITY defaultResendTo.accesskey "Π">
+<!ENTITY defaultResendTo.tooltip "Λίστα διευθύνσεων e-mail διαχωρισμένες με κόμμα.">
+
+<!ENTITY defaultResendCc.label "Εκ νέου αποστολή-Κοινοποίηση (Cc):">
+<!ENTITY defaultResendCc.accesskey "Ρ">
+<!ENTITY defaultResendCc.tooltip "Λίστα διευθύνσεων e-mail διαχωρισμένες με κόμμα.">
+
+<!ENTITY defaultResendBcc.label "Εκ νέου αποστολή-Κρυφή κοινοποίηση (Bcc):">
+<!ENTITY defaultResendBcc.accesskey "σ">
+<!ENTITY defaultResendBcc.tooltip "Λίστα διευθύνσεων e-mail διαχωρισμένες με κόμμα.">
+
+<!ENTITY defaultMode.label "Προεπιλεγμένη λειτουργία:">
+<!ENTITY defaultMode.accesskey "λ">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Επιλέξτε πώς θέλετε να ανακατευθύνονται τα μηνύματά σας από προεπιλογή\nΑυτή η ρύθμιση ενεργοποιείται μόνο όταν δεν έχετε καθορίσει προεπιλεγμένους παραλήπτες.">
+<!ENTITY defaultModeResendTo.label "Εκ νέου αποστολή-Προς">
+<!ENTITY defaultModeResendCc.label "Εκ νέου αποστολή-Κοινοποίηση (Cc)">
+<!ENTITY defaultModeResendBcc.label "Εκ νέου αποστολή-Κρυφή κοινοποίηση (Bcc)">
+
+<!ENTITY debug.label "Εντοπισμός σφαλμάτων">
+<!ENTITY debug.accesskey "Ε">
+<!ENTITY debug.tooltip "Ενεργοποίηση/απενεργοποίηση εντοπισμού σφαλμάτων για την επέκταση mailredirect. Τα αρχεία καταγραφής κατευθύνονται στην κονσόλα σφαλμάτων.">
+
+<!ENTITY saveConsoleContent.label2 "Αποθήκευση περιεχομένου κονσόλας σφαλμάτων…">
+<!ENTITY saveConsoleContent.accesskey2 "Α">
+<!ENTITY sendViaEmail.label "Αποστολή μέσω e-mail">
+<!ENTITY sendViaEmail.accesskey "e">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/el/mailredirect-prefs.properties b/chrome/locale/el/mailredirect-prefs.properties
new file mode 100644
index 0000000..a19d6c0
--- /dev/null
+++ b/chrome/locale/el/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Σφάλμα εγγραφής προσωρινού αρχείου.
+
+saveFile2=Αποθήκευση περιεχομένου κονσόλας σφαλμάτων
diff --git a/chrome/locale/el/mailredirect.dtd b/chrome/locale/el/mailredirect.dtd
new file mode 100644
index 0000000..b66d09b
--- /dev/null
+++ b/chrome/locale/el/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Ανακατεύθυνση">
+<!ENTITY bounceCommand.accesskey "ν">
+<!ENTITY bounceCommand.tooltip "Ανακατεύθυνση επιλεγμένων μηνυμάτων">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Ανακατεύθυνση">
+<!ENTITY forwardAsRedirect.accesskey "Α">
+<!ENTITY forwardAsRedirect.tooltip "Ανακατεύθυνση επιλεγμένου μηνύματος">
diff --git a/chrome/locale/el/mailredirect.properties b/chrome/locale/el/mailredirect.properties
new file mode 100644
index 0000000..3a93654
--- /dev/null
+++ b/chrome/locale/el/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Ανακατεύθυνση (γνωστό κι ως "remail") μηνυμάτων e-mail σε άλλους παραλήπτες.
diff --git a/chrome/locale/el/msgHdrViewOverlay.dtd b/chrome/locale/el/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..63aecdd
--- /dev/null
+++ b/chrome/locale/el/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Ανακατεύθυνση">
+<!ENTITY hdrMailredirectButton1.tooltip "Ανακατεύθυνση μηνύματος">
diff --git a/chrome/locale/en-US/mailredirect-compose.dtd b/chrome/locale/en-US/mailredirect-compose.dtd
new file mode 100644
index 0000000..0707522
--- /dev/null
+++ b/chrome/locale/en-US/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "File">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Redirect">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Close">
+<!ENTITY closeCmd.accesskey "C">
+
+<!ENTITY viewMenu.label "View">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Toolbars">
+<!ENTITY viewToolbarsMenuNew.accesskey "T">
+<!ENTITY menubarCmd.label "Menu Bar">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Tools">
+<!ENTITY tasksMenu.accesskey "T">
+<!ENTITY messengerCmd.label "Mail &amp; Newsgroups">
+<!ENTITY messengerCmd.accesskey "M">
+<!ENTITY addressBookCmd.label "Address Book">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Redirect">
+<!ENTITY bounceButton.tooltip "Redirect messages">
+<!ENTITY addressButton.label "Address Book">
+<!ENTITY addressButton.tooltip "Go to the address book">
+<!ENTITY throbberItem.title "Activity Indicator">
+<!ENTITY throbber.tooltip "Go to the &vendorShortName; home page">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Customize…">
+<!ENTITY customizeToolbar.accesskey "C">
+<!ENTITY showBounceToolbarCmd.label "Redirect Toolbar">
+<!ENTITY showBounceToolbarCmd.accesskey "o">
+<!ENTITY showStatusbarCmd.label "Status Bar">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "Contacts Sidebar">
+<!ENTITY addressSidebar.accesskey "o">
+<!ENTITY addressesSidebarTitle.label "Contacts">
+<!ENTITY addressSidebarButton.label "Contacts">
+<!ENTITY addressSidebarButton.tooltip "Select a recipient from an Address Book">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 9em;">
+
+<!ENTITY resendFromAddr.label "Resend-From:">
+<!ENTITY resendFromAddr.accesskey "R">
+
+<!ENTITY resendToAddr.label "Resend-To:">
+<!ENTITY resendCcAddr.label "Resend-Cc:">
+<!ENTITY resendBccAddr.label "Resend-Bcc:">
+
+<!ENTITY bounceMailsLabel.label "The following mails will be redirected:">
+
+<!ENTITY subject.label "Subject">
+<!ENTITY sender.label "Sender">
+<!ENTITY date.label "Date">
diff --git a/chrome/locale/en-US/mailredirect-compose.properties b/chrome/locale/en-US/mailredirect-compose.properties
new file mode 100644
index 0000000..a5e058f
--- /dev/null
+++ b/chrome/locale/en-US/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Mail Redirect:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=An error occurred while creating MailRedirect window. Please try again.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Add to Resend-To field
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Add to Resend-Cc field
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Add to Resend-Bcc field
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=Add to Resend-To:
+resendToButtonAccesskey=A
+resendCcButtonLabel=Add to Resend-Cc:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Add to Resend-Bcc:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=Resend-To->
+resendToContextMenuAccesskeySM=T
+resendCcContextMenuLabelSM=Resend-Cc->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Resend-Bcc->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Send Message;Send Messages
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Are you sure you are ready to send this message?;Are you sure you are ready to send these messages?
+sendMessageCheckSendButtonLabel=Send
+
+CheckMsg=Do not show me this dialog box again.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Message sent successfully;Messages sent successfully
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Message sending failed;Messages sending failed
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=No recipients were specified. Please enter a recipient in the addressing area.
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=No messages were selected. Please add one or more messages to the message area.
diff --git a/chrome/locale/en-US/mailredirect-prefs.dtd b/chrome/locale/en-US/mailredirect-prefs.dtd
new file mode 100644
index 0000000..8f1069d
--- /dev/null
+++ b/chrome/locale/en-US/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "MailRedirect Settings">
+
+<!ENTITY copyToSentMails.label "Place a copy of redirected mail in Sent folder?">
+<!ENTITY copyToSentMails.accesskey "P">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "If this option is checked, a copy of redirected message is placed in the Sent folder. If this option is unchecked, a copy of the redirected message is not copied to any folder.\nNote: If this option is checked and your settings for the account used for redirecting are 'not to save sent messages at all', a copy of the redirected messages will not be saved either.">
+
+<!ENTITY addToForwardAs.label "Add Redirect to Forward As menus and buttons">
+<!ENTITY addToForwardAs.accesskey "A">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "By adding Redirect to the Forward As menus and buttons you group all forwarding actions under one item.\nYou can remove the buttons from the toolbars by customizing them and by checking the option below, you can hide the separate menu items because they have become redundant.">
+
+<!ENTITY hideRedirectMenuitems.label "Hide Redirect menu item from Message, Application and context menus">
+<!ENTITY hideRedirectMenuitems.accesskey "H">
+<!ENTITY hideRedirectMenuitems.tooltip "Hides the separate Redirect menu items from the Message, Application and context menus.">
+
+<!ENTITY concurrentConnections.label "Number of concurrent SMTP connections:">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "The option specifies number of connections that will be established to your SMTP server while sending messages. In general, this allows you to increase performance of sending process when you choose to redirect huge amount of messages.\nNote: If you set this parameter to zero no limits of concurrent connections will apply - be warned that it could have impact on stability of your SMTP server or sending of some messages could fail. In case of any problems set this value to one.">
+
+<!ENTITY defaultRecipientsGroup.label "Default Recipients">
+
+<!ENTITY defaultResendTo.label "Resend-To:">
+<!ENTITY defaultResendTo.accesskey "T">
+<!ENTITY defaultResendTo.tooltip "Comma separated list of e-mail addresses.">
+
+<!ENTITY defaultResendCc.label "Resend-Cc:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Comma separated list of e-mail addresses.">
+
+<!ENTITY defaultResendBcc.label "Resend-Bcc:">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Comma separated list of e-mail addresses.">
+
+<!ENTITY defaultMode.label "Default mode:">
+<!ENTITY defaultMode.accesskey "m">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Choose how you want to redirect messages by default.\nThis setting only has effect when you have not specified any default recipients.">
+<!ENTITY defaultModeResendTo.label "Resend-To">
+<!ENTITY defaultModeResendCc.label "Resend-Cc">
+<!ENTITY defaultModeResendBcc.label "Resend-Bcc">
+
+<!ENTITY debug.label "Debug">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Turn on/off debugging for mailredirect extension. Logs are directed to the Error Console.">
+
+<!ENTITY saveConsoleContent.label2 "Save Error Console content…">
+<!ENTITY saveConsoleContent.accesskey2 "S">
+<!ENTITY sendViaEmail.label "Send via email">
+<!ENTITY sendViaEmail.accesskey "e">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/en-US/mailredirect-prefs.properties b/chrome/locale/en-US/mailredirect-prefs.properties
new file mode 100644
index 0000000..8e7df32
--- /dev/null
+++ b/chrome/locale/en-US/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Error writing temporary file.
+
+saveFile2=Save Error Console content
diff --git a/chrome/locale/en-US/mailredirect.dtd b/chrome/locale/en-US/mailredirect.dtd
new file mode 100644
index 0000000..2d54d53
--- /dev/null
+++ b/chrome/locale/en-US/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Redirect">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Redirect selected messages">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Redirect">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Redirect selected message">
diff --git a/chrome/locale/en-US/mailredirect.properties b/chrome/locale/en-US/mailredirect.properties
new file mode 100644
index 0000000..b6b2ca2
--- /dev/null
+++ b/chrome/locale/en-US/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Allow to redirect (a.k.a. "remail") mail messages to other recipients.
diff --git a/chrome/locale/en-US/msgHdrViewOverlay.dtd b/chrome/locale/en-US/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..e764021
--- /dev/null
+++ b/chrome/locale/en-US/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Redirect">
+<!ENTITY hdrMailredirectButton1.tooltip "Redirect this message">
diff --git a/chrome/locale/es-AR/mailredirect-compose.dtd b/chrome/locale/es-AR/mailredirect-compose.dtd
new file mode 100644
index 0000000..5fc2ed3
--- /dev/null
+++ b/chrome/locale/es-AR/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Redirigir Correo">
+
+<!ENTITY fileMenu.label "Archivo">
+<!ENTITY fileMenu.accesskey "A">
+<!ENTITY forwardBounce.label "Redirigir Correo">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Cerrar">
+<!ENTITY closeCmd.accesskey "C">
+
+<!ENTITY viewMenu.label "Ver">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Barras de herramientas">
+<!ENTITY viewToolbarsMenuNew.accesskey "H">
+<!ENTITY menubarCmd.label "Barra de Menú">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Herramientas">
+<!ENTITY tasksMenu.accesskey "t">
+<!ENTITY messengerCmd.label "Correo y noticias">
+<!ENTITY messengerCmd.accesskey "o">
+<!ENTITY addressBookCmd.label "Libreta de direcciones">
+<!ENTITY addressBookCmd.accesskey "a">
+
+<!ENTITY bounceButton.label "Reexpedir">
+<!ENTITY bounceButton.tooltip "Reexpedir mensages">
+<!ENTITY addressButton.label "Direcciones">
+<!ENTITY addressButton.tooltip "Ir a la libreta de direcciones">
+<!ENTITY throbberItem.title "Indicador de actividad">
+<!ENTITY throbber.tooltip "Ir a la página web de &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Personalizar…">
+<!ENTITY customizeToolbar.accesskey "C">
+<!ENTITY showBounceToolbarCmd.label "Barra de Reexpedir">
+<!ENTITY showBounceToolbarCmd.accesskey "R">
+<!ENTITY showStatusbarCmd.label "Barra de estado">
+<!ENTITY showStatusbarCmd.accesskey "s">
+
+<!ENTITY addressSidebar.label "Barra Lateral de Contactos">
+<!ENTITY addressSidebar.accesskey "o">
+<!ENTITY addressesSidebarTitle.label "Contactos">
+<!ENTITY addressSidebarButton.label "Contactos">
+<!ENTITY addressSidebarButton.tooltip "Seleccione un destinatario de una libreta de direcciones">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 11em;">
+
+<!ENTITY resendFromAddr.label "Reenviar-Desde:">
+<!ENTITY resendFromAddr.accesskey "r">
+
+<!ENTITY resendToAddr.label "Reenviado-a:">
+<!ENTITY resendCcAddr.label "Reenviado-Cc:">
+<!ENTITY resendBccAddr.label "Reenviado-Bcc:">
+
+<!ENTITY bounceMailsLabel.label "Los correos siguientes se reexpedirán:">
+
+<!ENTITY subject.label "Asunto">
+<!ENTITY sender.label "Remitente">
+<!ENTITY date.label "Fecha">
diff --git a/chrome/locale/es-AR/mailredirect-compose.properties b/chrome/locale/es-AR/mailredirect-compose.properties
new file mode 100644
index 0000000..29a4508
--- /dev/null
+++ b/chrome/locale/es-AR/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Redirigir Correo:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Se produjo un error al crear la ventana de MailRedirect. Por favor, inténtelo de nuevo.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Añadir al campo Reenviar-A
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Añadir al campo Reenviar-Cc
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Añadir al campo Reenviar-Bcc
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=Añadir a Reenviar-A:
+resendToButtonAccesskey=A
+resendCcButtonLabel=Añadir a Reenviar-Cc:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Añadir a Reenviar-Bcc:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=Reenviar-A->
+resendToContextMenuAccesskeySM=T
+resendCcContextMenuLabelSM=Reenviar-Cc->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Reenviar-Bcc->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Enviar Mensaje;Enviar Mensajes
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=¿Está seguro que quiere enviar este mensaje?;¿Está seguro que quiere enviar este mensajes?
+sendMessageCheckSendButtonLabel=Enviar
+
+CheckMsg=No mostrar este cajita de diálogo de nuevo.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Mensaje enviado con exito;Mensajes enviados con exito
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Mensaje no enviado;Mensajes no enviados
+
+#
+noRecipientsTitle=Redirigir Correo
+noRecipientsMessage=Ningun destinatario especificado. Por favor indicar por lo menos uno.
+
+#
+noMessagesTitle=Redirigir Correo
+noMessagesMessage=No se seleccionaron mensajes. Por favor, añada uno o más mensajes para el área de mensajes.
diff --git a/chrome/locale/es-AR/mailredirect-prefs.dtd b/chrome/locale/es-AR/mailredirect-prefs.dtd
new file mode 100644
index 0000000..295d1a3
--- /dev/null
+++ b/chrome/locale/es-AR/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Configuración MailRedirect">
+
+<!ENTITY copyToSentMails.label "¿Quiere poner una copia del correo reexpedido en la Carpeta de Enviados?">
+<!ENTITY copyToSentMails.accesskey "c">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Si esta opción está marcada, una copia del mensaje redirigido se coloca en la carpeta Enviados. Si la opción está desactivada, no se copia el mensaje redirigido en ninguna carpeta\nNota:. Si esta opción está activada y la configuración de la cuenta utilizada para redireccionar es 'no guardar los mensajes enviados en absoluto&quot;, la copia de los mensajes redireccionados no se pueden guardar.">
+
+<!ENTITY addToForwardAs.label "Agregar Reenviar como menús y botones">
+<!ENTITY addToForwardAs.accesskey "R">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "??By adding Redirect to the Forward As menus and buttons you group all forwarding actions under one item.\nYou can remove the buttons from the toolbars by customizing them and by checking the option below, you can hide the separate menu items because they have become redundant??">
+
+<!ENTITY hideRedirectMenuitems.label "??Hide Redirect menu item from Message, Application and context menus??">
+<!ENTITY hideRedirectMenuitems.accesskey "H">
+<!ENTITY hideRedirectMenuitems.tooltip "??Hides the separate Redirect menu items from the Message, Application and context menus??">
+
+<!ENTITY concurrentConnections.label "Numero de connections concurrentes de SMTP :">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "La opción especifica el número de conexiones que se establecerán con su servidor SMTP al enviar mensajes. En general, esto le permite aumentar el rendimiento del proceso de envío cuando usted decide redirigir gran cantidad de mensajes\nNota: Si establece este parámetro a cero, no se aplicará un límite de conexiones simultáneas - tenga en cuenta que ésto podría tener un impacto en la estabilidad de su servidor SMTP o el envío de algunos mensajes podrían fallar. En caso de cualquier problema, establezca este valor en uno.">
+
+<!ENTITY defaultRecipientsGroup.label "Destinatarios predeterminados">
+
+<!ENTITY defaultResendTo.label "Reenviado-A:">
+<!ENTITY defaultResendTo.accesskey "A">
+<!ENTITY defaultResendTo.tooltip "Lista separada por comas de direcciones de correo electrónico.">
+
+<!ENTITY defaultResendCc.label "Reenviado-Cc:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Lista separada por comas de direcciones de correo electrónico.">
+
+<!ENTITY defaultResendBcc.label "Reenviado-Bcc:">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Lista separada por comas de direcciones de correo electrónico.">
+
+<!ENTITY defaultMode.label "Modo por defecto:">
+<!ENTITY defaultMode.accesskey "m">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Elija cómo quiere redirigir los mensajes de forma predeterminada \nEste ajuste sólo tiene efecto cuando no se ha especificado ningún destinatario por defecto.">
+<!ENTITY defaultModeResendTo.label "Reenviar-A">
+<!ENTITY defaultModeResendCc.label "Reenviar-Cc">
+<!ENTITY defaultModeResendBcc.label "Reenviar-Bcc">
+
+<!ENTITY debug.label "Debug">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Apagar on/off debugging para mailredirect extension. Bitácoras están dirigidas a la Consola de JavaScript.">
+
+<!ENTITY saveConsoleContent.label2 "Guardar el contenido de la Consola de Error…">
+<!ENTITY saveConsoleContent.accesskey2 "G">
+<!ENTITY sendViaEmail.label "Enviar por email">
+<!ENTITY sendViaEmail.accesskey "E">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Redireccionar Correo">
diff --git a/chrome/locale/es-AR/mailredirect-prefs.properties b/chrome/locale/es-AR/mailredirect-prefs.properties
new file mode 100644
index 0000000..d66132b
--- /dev/null
+++ b/chrome/locale/es-AR/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Error al escribir el archivo temporal.
+
+saveFile2=Guardar el contenido de la Consola de Error
diff --git a/chrome/locale/es-AR/mailredirect.dtd b/chrome/locale/es-AR/mailredirect.dtd
new file mode 100644
index 0000000..4764a92
--- /dev/null
+++ b/chrome/locale/es-AR/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Reexpedir">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Reexpedir mensajes seleccionados">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Reexpedir">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Reexpedir mensajes seleccionados">
diff --git a/chrome/locale/es-AR/mailredirect.properties b/chrome/locale/es-AR/mailredirect.properties
new file mode 100644
index 0000000..251a213
--- /dev/null
+++ b/chrome/locale/es-AR/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Redirigir Mail (Mail Redirect)
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Permitir redirigir (a.k.a. "re-mail") los mensajes de correo a otros destinatarios.
diff --git a/chrome/locale/es-AR/msgHdrViewOverlay.dtd b/chrome/locale/es-AR/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..8eff82a
--- /dev/null
+++ b/chrome/locale/es-AR/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Redirigir">
+<!ENTITY hdrMailredirectButton1.tooltip "Redirigir este mensaje">
diff --git a/chrome/locale/es-ES/mailredirect-compose.dtd b/chrome/locale/es-ES/mailredirect-compose.dtd
new file mode 100644
index 0000000..9775af1
--- /dev/null
+++ b/chrome/locale/es-ES/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "Archivo">
+<!ENTITY fileMenu.accesskey "A">
+<!ENTITY forwardBounce.label "Redirigir">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Cerrar">
+<!ENTITY closeCmd.accesskey "C">
+
+<!ENTITY viewMenu.label "Ver">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Barras de herramientas">
+<!ENTITY viewToolbarsMenuNew.accesskey "r">
+<!ENTITY menubarCmd.label "Barra de menú">
+<!ENTITY menubarCmd.accesskey "m">
+
+<!ENTITY tasksMenu.label "Herramientas">
+<!ENTITY tasksMenu.accesskey "H">
+<!ENTITY messengerCmd.label "Correo y grupos de noticias">
+<!ENTITY messengerCmd.accesskey "C">
+<!ENTITY addressBookCmd.label "Libreta de direcciones">
+<!ENTITY addressBookCmd.accesskey "L">
+
+<!ENTITY bounceButton.label "Redirigir">
+<!ENTITY bounceButton.tooltip "Redirigir mensajes">
+<!ENTITY addressButton.label "Libreta de direcciones">
+<!ENTITY addressButton.tooltip "Ver la libreta de direcciones">
+<!ENTITY throbberItem.title "Progreso">
+<!ENTITY throbber.tooltip "Ir a la página de &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Personalizar…">
+<!ENTITY customizeToolbar.accesskey "P">
+<!ENTITY showBounceToolbarCmd.label "Barra de redirección">
+<!ENTITY showBounceToolbarCmd.accesskey "r">
+<!ENTITY showStatusbarCmd.label "Barra de estado">
+<!ENTITY showStatusbarCmd.accesskey "s">
+
+<!ENTITY addressSidebar.label "Panel lateral de contactos">
+<!ENTITY addressSidebar.accesskey "P">
+<!ENTITY addressesSidebarTitle.label "Contactos">
+<!ENTITY addressSidebarButton.label "Contactos">
+<!ENTITY addressSidebarButton.tooltip "Seleccione un destinatario del Libro de direcciones">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 12em;">
+
+<!ENTITY resendFromAddr.label "Redirigir-De:">
+<!ENTITY resendFromAddr.accesskey "D">
+
+<!ENTITY resendToAddr.label "Redirigir-A:">
+<!ENTITY resendCcAddr.label "Redirigir-Cc:">
+<!ENTITY resendBccAddr.label "Redirigir-Bcc:">
+
+<!ENTITY bounceMailsLabel.label "Los siguientes mensajes serán redirigidos:">
+
+<!ENTITY subject.label "Asunto">
+<!ENTITY sender.label "Remitente">
+<!ENTITY date.label "Fecha">
diff --git a/chrome/locale/es-ES/mailredirect-compose.properties b/chrome/locale/es-ES/mailredirect-compose.properties
new file mode 100644
index 0000000..be861c5
--- /dev/null
+++ b/chrome/locale/es-ES/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Mail Redirect:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Ocurrió un error al crear la ventana de MailRedirect. Por favor inténtelo de nuevo.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Añadir al campo Reenviar-A
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Añadir al campo Reenviar-Cc
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Añadir al campo Reenviar-cc
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=Añadir a Reenviar-A:
+resendToButtonAccesskey=A
+resendCcButtonLabel=Añadir a Reenviar-Cc:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Añadir a Reenviar-Bcc:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=Reenviar-A->
+resendToContextMenuAccesskeySM=A
+resendCcContextMenuLabelSM=Reenviar-Cc->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Reenviar-Bcc->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Enviar mensaje;Enviar mensajes
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=¿Enviar el mensajes?;¿Enviar los mensajes?
+sendMessageCheckSendButtonLabel=Enviar
+
+CheckMsg=No volver a mostrar esta ventana.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Mensaje enviado correctamente;Mensajes enviados correctamente
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Error al enviar mensaje;Error al enviar mensajes
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=No se ha especificado ningún destinatario. Introduzca alguno en el área de direcciones.
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=No se seleccionó ningún mensaje. Añada uno o varios mensajes al área de mensajes.
diff --git a/chrome/locale/es-ES/mailredirect-prefs.dtd b/chrome/locale/es-ES/mailredirect-prefs.dtd
new file mode 100644
index 0000000..f61dca6
--- /dev/null
+++ b/chrome/locale/es-ES/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Opciones de MailRedirect">
+
+<!ENTITY copyToSentMails.label "¿Desea guardar copia de los mensajes redirigidos en la carpeta Enviados?">
+<!ENTITY copyToSentMails.accesskey "c">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Si marca esta opción una copia de los mensajes redirigidos se guardará en la carpeta de enviados. Si no la marca no se guardará copia en ninguna carpeta.\nNota: Si marca esta opción pero la cuenta están predispuesta para no guardar ningún mensaje enviado, tampoco se guardará copia de los mensajes redirigidos.">
+
+<!ENTITY addToForwardAs.label "Añadir Redirigir a los menús e iconos de Reenviar como">
+<!ENTITY addToForwardAs.accesskey "R">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Al añadir Redirigir a los menús e iconos de Reenviar como estará agrupando todas las acciones de reenvío en un solo elemento.\nPuede eliminar los iconos de las barras de herramientas personalizándolos y, seleccionando la opción inferior, puede esconder los elementos de menú separados que se se han vuelto redundantes.">
+
+<!ENTITY hideRedirectMenuitems.label "Ocultar elementos del menú de Redirigir de los menús de Mensaje, Aplicación y contextuales.">
+<!ENTITY hideRedirectMenuitems.accesskey "O">
+<!ENTITY hideRedirectMenuitems.tooltip "Oculta los elementos de menú específicos de Redirigir de los menús de Mensaje, Aplicación y contextuales.">
+
+<!ENTITY concurrentConnections.label "Número de conexiones SMTP simultáneas:">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "La opción permite especificar el número de conexiones que se establecerán con el servidor SMTP al enviar los mensajes. En general, esto permite mejorar el rendimiento si redirige una gran cantidad de mensajes. \nNota: Si deja el valor de este parámetro en cero no se establecen límites en el número de conexiones simultáneas - esto puede ocasionar problemas en la estabilidad del servidor SMTP y el envío de algunos mensajes puede fallar. En caso de tener problemas ponga el valor a 1.">
+
+<!ENTITY defaultRecipientsGroup.label "Destinatarios predeterminados">
+
+<!ENTITY defaultResendTo.label "Redirigir A:">
+<!ENTITY defaultResendTo.accesskey "A">
+<!ENTITY defaultResendTo.tooltip "Lista de direcciones de correo separadas por comas.">
+
+<!ENTITY defaultResendCc.label "Redirigir-Cc:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Lista de direcciones de correo separadas por comas.">
+
+<!ENTITY defaultResendBcc.label "Redirigir-Bcc:">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Lista de direcciones de correo separadas por comas.">
+
+<!ENTITY defaultMode.label "Modo por defecto:">
+<!ENTITY defaultMode.accesskey "M">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Escoja la opción predeterminada para redirigir sus mensajes.\nEsta opción sólo tendrá efecto cuando no haya especificado ningún receptor por defecto.">
+<!ENTITY defaultModeResendTo.label "Redirigir-A">
+<!ENTITY defaultModeResendCc.label "Redirigir-Cc">
+<!ENTITY defaultModeResendBcc.label "Redirigir-Bcc">
+
+<!ENTITY debug.label "Depuración">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Habilitar la depuración para la extensión. Los registros aparecen en la consola Javascript.">
+
+<!ENTITY saveConsoleContent.label2 "Guardar contenido de la consola de errores…">
+<!ENTITY saveConsoleContent.accesskey2 "G">
+<!ENTITY sendViaEmail.label "Enviar por correo">
+<!ENTITY sendViaEmail.accesskey "E">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/es-ES/mailredirect-prefs.properties b/chrome/locale/es-ES/mailredirect-prefs.properties
new file mode 100644
index 0000000..09bdefc
--- /dev/null
+++ b/chrome/locale/es-ES/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Error al escribir el archivo temporal.
+
+saveFile2=Guardar contenido de la consola de errores
diff --git a/chrome/locale/es-ES/mailredirect.dtd b/chrome/locale/es-ES/mailredirect.dtd
new file mode 100644
index 0000000..9bd63a1
--- /dev/null
+++ b/chrome/locale/es-ES/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Redirigir">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Redirigir mensajes seleccionados">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Redirigir">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Redirigir mensaje seleccionado">
diff --git a/chrome/locale/es-ES/mailredirect.properties b/chrome/locale/es-ES/mailredirect.properties
new file mode 100644
index 0000000..0540bf1
--- /dev/null
+++ b/chrome/locale/es-ES/mailredirect.properties
@@ -0,0 +1,3 @@
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Redirigir correo (Mail Redirect)
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Permitir redirigir (o "rebotar") mensajes de correo a otros destinatarios.
diff --git a/chrome/locale/es-ES/msgHdrViewOverlay.dtd b/chrome/locale/es-ES/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..8eff82a
--- /dev/null
+++ b/chrome/locale/es-ES/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Redirigir">
+<!ENTITY hdrMailredirectButton1.tooltip "Redirigir este mensaje">
diff --git a/chrome/locale/es-MX/mailredirect-compose.dtd b/chrome/locale/es-MX/mailredirect-compose.dtd
new file mode 100644
index 0000000..8937c01
--- /dev/null
+++ b/chrome/locale/es-MX/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Redirección de correo">
+
+<!ENTITY fileMenu.label "Archivo">
+<!ENTITY fileMenu.accesskey "A">
+<!ENTITY forwardBounce.label "Redirigir">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Cerrar">
+<!ENTITY closeCmd.accesskey "C">
+
+<!ENTITY viewMenu.label "Ver">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Barras de herramientas">
+<!ENTITY viewToolbarsMenuNew.accesskey "h">
+<!ENTITY menubarCmd.label "Barra de menú">
+<!ENTITY menubarCmd.accesskey "m">
+
+<!ENTITY tasksMenu.label "Herramientas">
+<!ENTITY tasksMenu.accesskey "t">
+<!ENTITY messengerCmd.label "Correo y noticias">
+<!ENTITY messengerCmd.accesskey "o">
+<!ENTITY addressBookCmd.label "Libreta de direcciones">
+<!ENTITY addressBookCmd.accesskey "L">
+
+<!ENTITY bounceButton.label "Redirigir">
+<!ENTITY bounceButton.tooltip "Redirigir mensajes">
+<!ENTITY addressButton.label "Libreta de direcciones">
+<!ENTITY addressButton.tooltip "Ir a la libreta de direcciones">
+<!ENTITY throbberItem.title "Indicador de actividad">
+<!ENTITY throbber.tooltip "Ir a la página de &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Personalizar…">
+<!ENTITY customizeToolbar.accesskey "P">
+<!ENTITY showBounceToolbarCmd.label "Barra de herramientas de redirección">
+<!ENTITY showBounceToolbarCmd.accesskey "o">
+<!ENTITY showStatusbarCmd.label "Barra de estado">
+<!ENTITY showStatusbarCmd.accesskey "s">
+
+<!ENTITY addressSidebar.label "Panel lateral de contactos">
+<!ENTITY addressSidebar.accesskey "o">
+<!ENTITY addressesSidebarTitle.label "Contactos">
+<!ENTITY addressSidebarButton.label "Contactos">
+<!ENTITY addressSidebarButton.tooltip "Seleccione a un destinatario de una libreta de direcciones">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 9em;">
+
+<!ENTITY resendFromAddr.label "Redirigir-De:">
+<!ENTITY resendFromAddr.accesskey "R">
+
+<!ENTITY resendToAddr.label "Redirigir-A:">
+<!ENTITY resendCcAddr.label "Redirigir-Cc:">
+<!ENTITY resendBccAddr.label "Redirigir-Bcc:">
+
+<!ENTITY bounceMailsLabel.label "Los siguientes correos serán redirigidos:">
+
+<!ENTITY subject.label "Asunto">
+<!ENTITY sender.label "Remitente">
+<!ENTITY date.label "Fecha">
diff --git a/chrome/locale/es-MX/mailredirect-compose.properties b/chrome/locale/es-MX/mailredirect-compose.properties
new file mode 100644
index 0000000..5713a9f
--- /dev/null
+++ b/chrome/locale/es-MX/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Redirección de correo:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Redirección de correo
+initErrorDlogMessage=Ocurrió un error al crear la ventana de MailRedirect. Por favor inténtelo de nuevo.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Añadir al campo Reenviar-A
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Añadir al campo Reenviar-Cc
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Añadir al campo Reenviar-Bcc
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=Añadir a Reenviar-A:
+resendToButtonAccesskey=A
+resendCcButtonLabel=Añadir a Reenviar-Cc:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Añadir a Reenviar-Bcc:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=Reenviar-A->
+resendToContextMenuAccesskeySM=A
+resendCcContextMenuLabelSM=Reenviar-Cc->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Reenviar-Bcc->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Enviar mensaje;Enviar mensajes
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=¿Está seguro que usted está listo para enviar este mensaje?;¿Está seguro que usted está listo para enviar estos mensajes?
+sendMessageCheckSendButtonLabel=Enviar
+
+CheckMsg=No volver a mostrar este cuadro de diálogo.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Mensaje enviado con éxito; Mensajes enviados con éxito
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Error al enviar mensaje;Error al enviar mensajes
+
+#
+noRecipientsTitle=Redirección de correo
+noRecipientsMessage=No hay destinatarios especificados. Especifique a un destinatario en el área de direcciones.
+
+#
+noMessagesTitle=Redirección de correo
+noMessagesMessage=No se seleccionó ningún mensaje. Añada uno o varios mensajes al área de mensajes.
diff --git a/chrome/locale/es-MX/mailredirect-prefs.dtd b/chrome/locale/es-MX/mailredirect-prefs.dtd
new file mode 100644
index 0000000..c3b7ff5
--- /dev/null
+++ b/chrome/locale/es-MX/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Opciones de MailRedirect">
+
+<!ENTITY copyToSentMails.label "¿Desea guardar copia de los mensajes redirigidos en la carpeta Enviados?">
+<!ENTITY copyToSentMails.accesskey "s">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Si marca esta opción, una copia de los mensajes redirigidos se guardará en la carpeta de Enviados. Si no la marca, no se guardará copia en ninguna carpeta.\nNota: Si marca esta opción pero la cuenta están predispuesta para no guardar ningún mensaje enviado, tampoco se guardará copia de los mensajes redirigidos.">
+
+<!ENTITY addToForwardAs.label "Añadir Redirigir a Reenviar como menús y botones.">
+<!ENTITY addToForwardAs.accesskey "g">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Al agregar &quot;Redirigir&quot; a los menúes y botones de Reenviar se agrupan todas las acciones de reenvío en un solo elemento.\nPuede eliminar los botones de las barras de herramientas al personalizarlos y al marcar la opción a continuación, puede ocultar los elementos de menú separados porque se han vuelto redundantes.">
+
+<!ENTITY hideRedirectMenuitems.label "Ocultar &quot;Redirigir&quot; de los menúes de Mensaje, Aplicación y contexto.">
+<!ENTITY hideRedirectMenuitems.accesskey "O">
+<!ENTITY hideRedirectMenuitems.tooltip "Oculta los elementos de &quot;Redirigir&quot; que están separados de los menúes de Mensaje, Aplicación y contexto.">
+
+<!ENTITY concurrentConnections.label "Número de conexiones SMTP simultáneas:">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "La opción permite especificar el número de conexiones que se establecerán con el servidor SMTP al enviar los mensajes. En general, esto permite mejorar el rendimiento si redirige una gran cantidad de mensajes. \nNota: Si deja el valor de este parámetro en cero no se establecen límites en el número de conexiones simultáneas - esto puede ocasionar problemas en la estabilidad del servidor SMTP y el envío de algunos mensajes puede fallar. En caso de tener problemas ponga el valor a 1.">
+
+<!ENTITY defaultRecipientsGroup.label "Destinatarios predeterminados">
+
+<!ENTITY defaultResendTo.label "Redirigir-A:">
+<!ENTITY defaultResendTo.accesskey "A">
+<!ENTITY defaultResendTo.tooltip "Lista de direcciones de correo separadas por comas.">
+
+<!ENTITY defaultResendCc.label "Redirigir-Cc:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Lista de direcciones de correo separadas por comas.">
+
+<!ENTITY defaultResendBcc.label "Redirigir-Bcc:">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Lista de direcciones de correo separadas por comas.">
+
+<!ENTITY defaultMode.label "Modo predeterminado:">
+<!ENTITY defaultMode.accesskey "M">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Escoja la opción predeterminada para redirigir sus mensajes.\nEsta opción sólo tendrá efecto cuando no haya especificado ningún receptor por defecto.">
+<!ENTITY defaultModeResendTo.label "Redirigir-A">
+<!ENTITY defaultModeResendCc.label "Redirigir-Cc">
+<!ENTITY defaultModeResendBcc.label "Redirigir-Bcc">
+
+<!ENTITY debug.label "Depuración">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Habilitar/Deshabilitar la depuración para la extensión de redirección de correo. Los registros aparecen en la consola Javascript.">
+
+<!ENTITY saveConsoleContent.label2 "Guardar el contenido de la consola de errores…">
+<!ENTITY saveConsoleContent.accesskey2 "G">
+<!ENTITY sendViaEmail.label "Enviar por correo electrónico">
+<!ENTITY sendViaEmail.accesskey "E">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Redirección de correo">
diff --git a/chrome/locale/es-MX/mailredirect-prefs.properties b/chrome/locale/es-MX/mailredirect-prefs.properties
new file mode 100644
index 0000000..0f1f035
--- /dev/null
+++ b/chrome/locale/es-MX/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Redirección de correo
+tempFileErrorDlogMessage=Error al escribir el archivo temporal.
+
+saveFile2=Guardar contenido de la consola de errores
diff --git a/chrome/locale/es-MX/mailredirect.dtd b/chrome/locale/es-MX/mailredirect.dtd
new file mode 100644
index 0000000..bd7e80e
--- /dev/null
+++ b/chrome/locale/es-MX/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Redirigir">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Redirigir mensajes seleccionados">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Redirigir">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Redirigir el mensaje seleccionado">
diff --git a/chrome/locale/es-MX/mailredirect.properties b/chrome/locale/es-MX/mailredirect.properties
new file mode 100644
index 0000000..42cb6f0
--- /dev/null
+++ b/chrome/locale/es-MX/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Permitir redirigir (o "rebotar") mensajes de correo a otros destinatarios.
diff --git a/chrome/locale/es-MX/msgHdrViewOverlay.dtd b/chrome/locale/es-MX/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..8eff82a
--- /dev/null
+++ b/chrome/locale/es-MX/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Redirigir">
+<!ENTITY hdrMailredirectButton1.tooltip "Redirigir este mensaje">
diff --git a/chrome/locale/fi/mailredirect-compose.dtd b/chrome/locale/fi/mailredirect-compose.dtd
new file mode 100644
index 0000000..dd0054d
--- /dev/null
+++ b/chrome/locale/fi/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Sähköpostin uudelleenohjaus">
+
+<!ENTITY fileMenu.label "Tiedosto">
+<!ENTITY fileMenu.accesskey "T">
+<!ENTITY forwardBounce.label "Uudelleenohjaa">
+<!ENTITY forwardBounce.accesskey "u">
+<!ENTITY closeCmd.label "Sulje">
+<!ENTITY closeCmd.accesskey "S">
+
+<!ENTITY viewMenu.label "Näytä">
+<!ENTITY viewMenu.accesskey "N">
+<!ENTITY viewToolbarsMenuNew.label "Työkalupalkki">
+<!ENTITY viewToolbarsMenuNew.accesskey "o">
+<!ENTITY menubarCmd.label "Valikkopalkki">
+<!ENTITY menubarCmd.accesskey "V">
+
+<!ENTITY tasksMenu.label "Työkalut">
+<!ENTITY tasksMenu.accesskey "y">
+<!ENTITY messengerCmd.label "Sähköposti &amp; Uutisryhmät">
+<!ENTITY messengerCmd.accesskey "S">
+<!ENTITY addressBookCmd.label "Osoitekirja">
+<!ENTITY addressBookCmd.accesskey "O">
+
+<!ENTITY bounceButton.label "Uudelleenohjaa">
+<!ENTITY bounceButton.tooltip "Uudelleenohjaa viestit">
+<!ENTITY addressButton.label "Osoitekirja">
+<!ENTITY addressButton.tooltip "Siirry osoitekirjaan">
+<!ENTITY throbberItem.title "Toimintailmaisin">
+<!ENTITY throbber.tooltip "Siirry &vendorShortName; -kotisivulle">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Mukauta...">
+<!ENTITY customizeToolbar.accesskey "M">
+<!ENTITY showBounceToolbarCmd.label "Uudelleenohjauspalkki">
+<!ENTITY showBounceToolbarCmd.accesskey "l">
+<!ENTITY showStatusbarCmd.label "Tilapalkki">
+<!ENTITY showStatusbarCmd.accesskey "p">
+
+<!ENTITY addressSidebar.label "Yhteystietosivupalkki">
+<!ENTITY addressSidebar.accesskey "h">
+<!ENTITY addressesSidebarTitle.label "Yhteystiedot">
+<!ENTITY addressSidebarButton.label "Yhteystiedot">
+<!ENTITY addressSidebarButton.tooltip "Valitse vastaanottaja osoitekirjasta">
+
+<!ENTITY dialog.dimensions "leveys: 92ch; korkeus: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "leveys: 9em;">
+
+<!ENTITY resendFromAddr.label "Lähettäjä:">
+<!ENTITY resendFromAddr.accesskey "L">
+
+<!ENTITY resendToAddr.label "Vastaanottaja:">
+<!ENTITY resendCcAddr.label "Kopio:">
+<!ENTITY resendBccAddr.label "Piilokopio:">
+
+<!ENTITY bounceMailsLabel.label "Seuraavat viestit uudelleenohjataan:">
+
+<!ENTITY subject.label "Aihe">
+<!ENTITY sender.label "Lähettäjä">
+<!ENTITY date.label "Päivämäärä">
diff --git a/chrome/locale/fi/mailredirect-compose.properties b/chrome/locale/fi/mailredirect-compose.properties
new file mode 100644
index 0000000..a1eb14f
--- /dev/null
+++ b/chrome/locale/fi/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Sähköpostin uudelleenohjaus:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Sähköpostin uudelleenohjaus
+initErrorDlogMessage=MailRedirect-ikkunan luonti epäonnistui. Yritä uudelleen.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Lisää vastaanottaja-kenttään
+resendToContextMenuAccesskeyTB=L
+resendCcContextMenuLabelTB=Lisää kopio-kenttään
+resendCcContextMenuAccesskeyTB=k
+resendBccContextMenuLabelTB=Lisää piilokopio-kenttään
+resendBccContextMenuAccesskeyTB=p
+resendToButtonLabel=Lisää vastaanottajaksi:
+resendToButtonAccesskey=L
+resendCcButtonLabel=Lisää kopioksi:
+resendCcButtonAccesskey=k
+resendBccButtonLabel=Lisää piilokopioksi:
+resendBccButtonAccesskey=p
+resendToContextMenuLabelSM=Vastaanottaja ->
+resendToContextMenuAccesskeySM=V
+resendCcContextMenuLabelSM=Kopio ->
+resendCcContextMenuAccesskeySM=K
+resendBccContextMenuLabelSM=Piilokopio ->
+resendBccContextMenuAccesskeySM=p
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Lähetä viesti;Lähetä viestit
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Haluatko varmasti lähettää tämän viestin?;Haluatko varmasti lähettää nämä viestit?
+sendMessageCheckSendButtonLabel=Lähetä
+
+CheckMsg=Älä näytä tätä valintaikkunaa uudelleen.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Viesti lähetetty onnistuneesti;Viestit lähetetty onnistuneesti
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Viestin lähettäminen epäonnistui;Viestien lähettäminen epäonnistui
+
+#
+noRecipientsTitle=Sähköpostin uudelleenohjaus
+noRecipientsMessage=Vastaanottajia ei määritelty. Syötä vastaanottaja osoitekenttään.
+
+#
+noMessagesTitle=Sähköpostin uudelleenohjaus
+noMessagesMessage=Viestiä ei valittu. Lisää yksi tai useampi viesti viestikenttään.
diff --git a/chrome/locale/fi/mailredirect-prefs.dtd b/chrome/locale/fi/mailredirect-prefs.dtd
new file mode 100644
index 0000000..1a7b831
--- /dev/null
+++ b/chrome/locale/fi/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "MailRedirect -asetukset">
+
+<!ENTITY copyToSentMails.label "Jätä kopio uudelleenohjatusta lähetetyt-kansioon?">
+<!ENTITY copyToSentMails.accesskey "J">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Jos tämä vaihtoehto on valittuna, uudelleenohjatun viestin kopio sijoitetaan lähetetyt-kansioon. Jos asetusta ei ole valittu, uudelleenohjatun viestin kopiota ei kopioida mihinkään kansioon.\nHuomio: Jos tämä vaihtoehto on valittuna ja käytettävän sähköpostitilin asetuksissä on määritetty, että &quot;lähetettyjä viestejä ei talleteta lähetetyt-kansioon&quot;, ei uudelleenohjatun viestin kopiotakaan tallenneta.">
+
+<!ENTITY addToForwardAs.label "Lisää uudelleenohjaus Välitysvalikkoon ja -painikkeisiin">
+<!ENTITY addToForwardAs.accesskey "A">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Lisäämällä uudelleenohjauksen Välitysvalikkoon ja -painikkeisiin ryhmittelet kaikki välitystoiminnot yhden kohteen alle.\nVoit poistaa painikkeet työkalupalkista muokkaamalla niitä ja tarkistamalla asetukset alta, voit piilottaa erilliset valikkokohteet, koska niistä on tullut tarpeettomia.">
+
+<!ENTITY hideRedirectMenuitems.label "Piilota uudelleenohjaus-valikkokohde, viestistä sekä sovellus- ja pikavalikoista">
+<!ENTITY hideRedirectMenuitems.accesskey "H">
+<!ENTITY hideRedirectMenuitems.tooltip "Piilottaa uudelleenohjaus-valikkokohteen, viestistä sekä sovellus- ja pikavalikoista.">
+
+<!ENTITY concurrentConnections.label "Yhtäaikaisten SMTP-yhteyksien määrä:">
+<!ENTITY concurrentConnections.accesskey "Y">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Asetus määrittää viestien lähetyksen yhteydessä muodostettavan yhteysmäärän SMTP-palvelimellesi. Tämän avulla voit lisätä lähetysprosessin suorituskykyä, jos olet lähettämässä isoa viestimäärää.\nHuomio: Jos asetat asetuksen nollaksi, yhtäaikaiseten yhteyksien määrää ei rajoiteta - tämä saattaa vaikuttaa SMTP-palvelimesi vakauteen tai joidenkin lähetettävien viestin lähetys saattaa epäonnistua. Ongelmien ilmetessä, aseta arvoksi numero yksi.">
+
+<!ENTITY defaultRecipientsGroup.label "Oletusvastaanottajat">
+
+<!ENTITY defaultResendTo.label "Vastaanottaja:">
+<!ENTITY defaultResendTo.accesskey "V">
+<!ENTITY defaultResendTo.tooltip "Pilkuilla erotettu sähköpostiosoitteiden luettelo.">
+
+<!ENTITY defaultResendCc.label "Kopio:">
+<!ENTITY defaultResendCc.accesskey "K">
+<!ENTITY defaultResendCc.tooltip "Pilkuilla erotettu sähköpostiosoitteiden luettelo.">
+
+<!ENTITY defaultResendBcc.label "Piilokopio:">
+<!ENTITY defaultResendBcc.accesskey "P">
+<!ENTITY defaultResendBcc.tooltip "Pilkuilla erotettu sähköpostiosoitteiden luettelo.">
+
+<!ENTITY defaultMode.label "Oletustila:">
+<!ENTITY defaultMode.accesskey "t">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Valitse, miten haluat oletuksena uudelleenohjata viestit.\nTämä asetus on voimassa vain, jollet ole määrittänyt yhtään oletusvastaanottajaa.">
+<!ENTITY defaultModeResendTo.label "Vastaanottaja">
+<!ENTITY defaultModeResendCc.label "Kopio">
+<!ENTITY defaultModeResendBcc.label "Piilokopio">
+
+<!ENTITY debug.label "Virheenkorjaus">
+<!ENTITY debug.accesskey "V">
+<!ENTITY debug.tooltip "Vaihda uudelleenohjaus-lisäosan virheenkorjauksen tilaa. Lokit ohjataan JavaScript-konsoliin.">
+
+<!ENTITY saveConsoleContent.label2 "Tallenna virhekonsolin sisältö...">
+<!ENTITY saveConsoleContent.accesskey2 "T">
+<!ENTITY sendViaEmail.label "Lähetä sähköpostilla">
+<!ENTITY sendViaEmail.accesskey "t">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Sähköpostin uudelleenohjaus">
diff --git a/chrome/locale/fi/mailredirect-prefs.properties b/chrome/locale/fi/mailredirect-prefs.properties
new file mode 100644
index 0000000..964581b
--- /dev/null
+++ b/chrome/locale/fi/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Sähköpostin uudelleenohjaus
+tempFileErrorDlogMessage=Virhe kirjoitettaessa väliaikaistiedostoa.
+
+saveFile2=Tallenna virhekonsolin sisältö
diff --git a/chrome/locale/fi/mailredirect.dtd b/chrome/locale/fi/mailredirect.dtd
new file mode 100644
index 0000000..d04a327
--- /dev/null
+++ b/chrome/locale/fi/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Uudelleenohjaa">
+<!ENTITY bounceCommand.accesskey "h">
+<!ENTITY bounceCommand.tooltip "Uudelleenohjaa valitut viestit">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Uudelleenohjaa">
+<!ENTITY forwardAsRedirect.accesskey "U">
+<!ENTITY forwardAsRedirect.tooltip "Uudelleenohjaa valittu viesti">
diff --git a/chrome/locale/fi/mailredirect.properties b/chrome/locale/fi/mailredirect.properties
new file mode 100644
index 0000000..de2935d
--- /dev/null
+++ b/chrome/locale/fi/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Salli sähköpostiviestien välitys (a.k.a. "remail") toisille vastaanottajille.
diff --git a/chrome/locale/fi/msgHdrViewOverlay.dtd b/chrome/locale/fi/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..05f8a3c
--- /dev/null
+++ b/chrome/locale/fi/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Uudelleenohjaa">
+<!ENTITY hdrMailredirectButton1.tooltip "Uudelleenohjaa tämä viesti">
diff --git a/chrome/locale/fr/mailredirect-compose.dtd b/chrome/locale/fr/mailredirect-compose.dtd
new file mode 100644
index 0000000..6b82812
--- /dev/null
+++ b/chrome/locale/fr/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "Fichier">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Rediriger">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Fermer">
+<!ENTITY closeCmd.accesskey "F">
+
+<!ENTITY viewMenu.label "Affichage">
+<!ENTITY viewMenu.accesskey "c">
+<!ENTITY viewToolbarsMenuNew.label "Barres d'outils">
+<!ENTITY viewToolbarsMenuNew.accesskey "t">
+<!ENTITY menubarCmd.label "Barre de menu">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Outils">
+<!ENTITY tasksMenu.accesskey "t">
+<!ENTITY messengerCmd.label "Courrier &amp; Forums">
+<!ENTITY messengerCmd.accesskey "C">
+<!ENTITY addressBookCmd.label "Carnet d'adresses">
+<!ENTITY addressBookCmd.accesskey "a">
+
+<!ENTITY bounceButton.label "Rediriger">
+<!ENTITY bounceButton.tooltip "Rediriger les messages">
+<!ENTITY addressButton.label "Adresses">
+<!ENTITY addressButton.tooltip "Ouvrir le carnet d'adresses">
+<!ENTITY throbberItem.title "Indicateur d'activité">
+<!ENTITY throbber.tooltip "Aller à la page de &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Personnaliser…">
+<!ENTITY customizeToolbar.accesskey "P">
+<!ENTITY showBounceToolbarCmd.label "Barre d'outils courrier">
+<!ENTITY showBounceToolbarCmd.accesskey "t">
+<!ENTITY showStatusbarCmd.label "Barre d'état">
+<!ENTITY showStatusbarCmd.accesskey "B">
+
+<!ENTITY addressSidebar.label "Panneau latéral des contacts">
+<!ENTITY addressSidebar.accesskey "P">
+<!ENTITY addressesSidebarTitle.label "Contacts">
+<!ENTITY addressSidebarButton.label "Contacts">
+<!ENTITY addressSidebarButton.tooltip "Choisissez un destinataire dans le carnet d'adresses">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 12em;">
+
+<!ENTITY resendFromAddr.label "Rediriger-De :">
+<!ENTITY resendFromAddr.accesskey "D">
+
+<!ENTITY resendToAddr.label "Rediriger-Pour :">
+<!ENTITY resendCcAddr.label "Rediriger-Copie :">
+<!ENTITY resendBccAddr.label "Rediriger-Copie cachée :">
+
+<!ENTITY bounceMailsLabel.label "Les messages suivants seront redirigés :">
+
+<!ENTITY subject.label "Sujet">
+<!ENTITY sender.label "Expéditeur">
+<!ENTITY date.label "Date">
diff --git a/chrome/locale/fr/mailredirect-compose.properties b/chrome/locale/fr/mailredirect-compose.properties
new file mode 100644
index 0000000..105606b
--- /dev/null
+++ b/chrome/locale/fr/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Mail Redirect :
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Une erreur s'est produite à la création de la fenêtre MailRedirect. Veuillez réessayer.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=2
+
+resendToContextMenuLabelTB=Ajouter au champ Ré-envoyer
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Ajouter au champ Ré-envoyer en copie
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Ajouter au champ Ré-envoyer en copie cachée
+resendBccContextMenuAccesskeyTB=i
+resendToButtonLabel=Ajouter à Ré-envoyer :
+resendToButtonAccesskey=R
+resendCcButtonLabel=Ajouter à Ré-envoyer en copie :
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Ajouter à Ré-envoyer en copie cachée :
+resendBccButtonAccesskey=i
+resendToContextMenuLabelSM=Ré-envoyer ->
+resendToContextMenuAccesskeySM=v
+resendCcContextMenuLabelSM=Ré-envoyer en copie ->
+resendCcContextMenuAccesskeySM=c
+resendBccContextMenuLabelSM=Ré-envoyer en copie cachée ->
+resendBccContextMenuAccesskeySM=i
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Envoyer le message;Envoyer les messages
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Voulez-vous vraiment envoyer ce message tout de suite ?;Voulez-vous vraiment envoyer ces messages tout de suite ?
+sendMessageCheckSendButtonLabel=Envoyer
+
+CheckMsg=Ne plus afficher cette boîte de dialogue.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Message envoyé avec succès;Messages envoyés avec succès
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Erreur lors de l'envoi du message;Erreur lors de l'envoi des messages
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=Aucun destinataire spécifié. Veuillez saisir un destinataire dans la zone d'adressage.
+
+#
+noMessagesTitle=Extension mail redirect
+noMessagesMessage=Aucun message sélectionné. veuillez ajouter au moins un message dans le champ de composition des messages.
diff --git a/chrome/locale/fr/mailredirect-prefs.dtd b/chrome/locale/fr/mailredirect-prefs.dtd
new file mode 100644
index 0000000..d57cef4
--- /dev/null
+++ b/chrome/locale/fr/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Options de l'extension MailRedirect">
+
+<!ENTITY copyToSentMails.label "Placer une copie du message redirigé dans le dossier Envoyés ?">
+<!ENTITY copyToSentMails.accesskey "r">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Si cette option est cochée, une copie du message redirigé est placée dans le dossier Envoyés. Si cette option n'est pas cochée, le message redirigé n'est pas copié.\nRemarque : si cette option est cochée et que le compte utilisé pour la redirection a pour paramètre 'ne pas faire de copie des messages envoyés', aucune copie du message redirigé ne sera enregistrée.">
+
+<!ENTITY addToForwardAs.label "Ajouter Rediriger aux menus et boutons Transférer">
+<!ENTITY addToForwardAs.accesskey "A">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "En ajoutant Rediriger aux menus et boutons de transférer, vous regroupez toutes les actions de transfert en un même point. \nVous pouvez supprimer les boutons dans les barres d’outils en les personnalisant et en cochant l’option ci-dessous, vous pouvez masquer les éléments de menu distincts parce qu’ils sont devenus redondants.">
+
+<!ENTITY hideRedirectMenuitems.label "Cacher le menu de Rediriger du menu contextuel et des menus Messages et Outils">
+<!ENTITY hideRedirectMenuitems.accesskey "h">
+<!ENTITY hideRedirectMenuitems.tooltip "Cacher les entrées de menu spécifiques de Rediriger hors du menu contextuel et des menus Messages et Outils.">
+
+<!ENTITY concurrentConnections.label "Nombre de connexions SMTP simultanées :">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Nombre de connexions à établir sur votre serveur SMTP lors de l'envoi des messages. En général, cela permet d’améliorer les performances lors de l'envoi d'un nombre important de messages.\nRemarque : Utiliser la valeur 0 pour ne pas limiter le nombre de connexions simultanées - la stabilité de votre serveur SMTP peut être affectée ou l'envoi de certains messages peut échouer. En cas de problème, mettre cette valeur à 1.">
+
+<!ENTITY defaultRecipientsGroup.label "Destinataires par défaut">
+
+<!ENTITY defaultResendTo.label "Rediriger-Pour:">
+<!ENTITY defaultResendTo.accesskey "P">
+<!ENTITY defaultResendTo.tooltip "Liste d'adresses mail séparées par des virgules.">
+
+<!ENTITY defaultResendCc.label "Rediriger-Copie:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Liste d'adresses mail séparées par des virgules.">
+
+<!ENTITY defaultResendBcc.label "Rediriger-Copie cachée:">
+<!ENTITY defaultResendBcc.accesskey "o">
+<!ENTITY defaultResendBcc.tooltip "Liste d'adresses mail séparées par des virgules.">
+
+<!ENTITY defaultMode.label "Mode par défaut :">
+<!ENTITY defaultMode.accesskey "M">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Choisissez de quelle manière vous voulez rediriger les messages par défaut.\nCe paramètre n'aura d'effet que si vous n'avez pas précisé les destinataires par défaut.">
+<!ENTITY defaultModeResendTo.label "Ré-envoyer">
+<!ENTITY defaultModeResendCc.label "Ré-envoyer en copie">
+<!ENTITY defaultModeResendBcc.label "Ré-envoyer en copie cachée">
+
+<!ENTITY debug.label "Débogage">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Activer/Désactiver le débogueur de l'extension MailRedirect. Logs envoyés vers la Console JavaScript.">
+
+<!ENTITY saveConsoleContent.label2 "Enregistrer le contenu de la console d'erreurs…">
+<!ENTITY saveConsoleContent.accesskey2 "E">
+<!ENTITY sendViaEmail.label "Envoyer par courrier électronique">
+<!ENTITY sendViaEmail.accesskey "n">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/fr/mailredirect-prefs.properties b/chrome/locale/fr/mailredirect-prefs.properties
new file mode 100644
index 0000000..6da71ba
--- /dev/null
+++ b/chrome/locale/fr/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Erreur d'écriture du fichier temporaire.
+
+saveFile2=Enregistrer le contenu de la console d'erreur
diff --git a/chrome/locale/fr/mailredirect.dtd b/chrome/locale/fr/mailredirect.dtd
new file mode 100644
index 0000000..376f396
--- /dev/null
+++ b/chrome/locale/fr/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Rediriger">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Rediriger les messages sélectionnés">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Rediriger">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Rediriger le message sélectionné">
diff --git a/chrome/locale/fr/mailredirect.properties b/chrome/locale/fr/mailredirect.properties
new file mode 100644
index 0000000..19af929
--- /dev/null
+++ b/chrome/locale/fr/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Permet de rediriger (faire « rebondir ») les messages vers d'autres destinataires.
diff --git a/chrome/locale/fr/msgHdrViewOverlay.dtd b/chrome/locale/fr/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..a204e13
--- /dev/null
+++ b/chrome/locale/fr/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Rediriger">
+<!ENTITY hdrMailredirectButton1.tooltip "Rediriger ce message">
diff --git a/chrome/locale/hu/mailredirect-compose.dtd b/chrome/locale/hu/mailredirect-compose.dtd
new file mode 100644
index 0000000..9fcdf17
--- /dev/null
+++ b/chrome/locale/hu/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Üzenet átirányítás">
+
+<!ENTITY fileMenu.label "Fájl">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Átirányítás azonnal">
+<!ENTITY forwardBounce.accesskey "a">
+<!ENTITY closeCmd.label "Bezárás">
+<!ENTITY closeCmd.accesskey "B">
+
+<!ENTITY viewMenu.label "Nézet">
+<!ENTITY viewMenu.accesskey "N">
+<!ENTITY viewToolbarsMenuNew.label "Eszköztárak">
+<!ENTITY viewToolbarsMenuNew.accesskey "E">
+<!ENTITY menubarCmd.label "Menüsor">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Eszközök">
+<!ENTITY tasksMenu.accesskey "E">
+<!ENTITY messengerCmd.label "Levelező és hírolvasó">
+<!ENTITY messengerCmd.accesskey "L">
+<!ENTITY addressBookCmd.label "Címjegyzék">
+<!ENTITY addressBookCmd.accesskey "C">
+
+<!ENTITY bounceButton.label "Átirányítás">
+<!ENTITY bounceButton.tooltip "Üzenet átirányítás">
+<!ENTITY addressButton.label "Címjegyzék">
+<!ENTITY addressButton.tooltip "A címjegyzék megjelenítése">
+<!ENTITY throbberItem.title "Tevékenységmutató">
+<!ENTITY throbber.tooltip "Keserse fel: &vendorShortName; honlapja">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Testreszabás…">
+<!ENTITY customizeToolbar.accesskey "T">
+<!ENTITY showBounceToolbarCmd.label "Átirányítás eszköztár">
+<!ENTITY showBounceToolbarCmd.accesskey "Á">
+<!ENTITY showStatusbarCmd.label "Állapotsor">
+<!ENTITY showStatusbarCmd.accesskey "o">
+
+<!ENTITY addressSidebar.label "Névjegyzék oldalsáv">
+<!ENTITY addressSidebar.accesskey "j">
+<!ENTITY addressesSidebarTitle.label "Névjegyzék">
+<!ENTITY addressSidebarButton.label "Névjegyzék">
+<!ENTITY addressSidebarButton.tooltip "Válassza ki a címzettet a névjegyzékből">
+
+<!ENTITY dialog.dimensions "width: 100ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 16em;">
+
+<!ENTITY resendFromAddr.label "Feladó újraküldés:">
+<!ENTITY resendFromAddr.accesskey "r">
+
+<!ENTITY resendToAddr.label "Címzett újraküldés:">
+<!ENTITY resendCcAddr.label "Másolat újraküldés:">
+<!ENTITY resendBccAddr.label "Rejtett másolat újraküldés:">
+
+<!ENTITY bounceMailsLabel.label "Következő üzenetek lesznek átirányítva:">
+
+<!ENTITY subject.label "Tárgy">
+<!ENTITY sender.label "Feladó">
+<!ENTITY date.label "Dátum">
diff --git a/chrome/locale/hu/mailredirect-compose.properties b/chrome/locale/hu/mailredirect-compose.properties
new file mode 100644
index 0000000..eb00af1
--- /dev/null
+++ b/chrome/locale/hu/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Üzenet átirányítás:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Üzenet átirányítás
+initErrorDlogMessage=Hiba történt „Üzenet átirányítás” ablak létrehozás. Kérlek próbáld újra.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Hozzáadás a Címzett újraküldés mezőhöz
+resendToContextMenuAccesskeyTB=C
+resendCcContextMenuLabelTB=Hozzáadás a Másolat újraküldés mezőhöz
+resendCcContextMenuAccesskeyTB=M
+resendBccContextMenuLabelTB=Hozzáadás a Rejtett másolat újraküldés mezőhöz
+resendBccContextMenuAccesskeyTB=R
+resendToButtonLabel=Címzett újraküldés:
+resendToButtonAccesskey=C
+resendCcButtonLabel=Másolat újraküldés:
+resendCcButtonAccesskey=M
+resendBccButtonLabel=Rejtett másolat újraküldés:
+resendBccButtonAccesskey=R
+resendToContextMenuLabelSM=Címzett újraküldés->
+resendToContextMenuAccesskeySM=C
+resendCcContextMenuLabelSM=Másolat újraküldés->
+resendCcContextMenuAccesskeySM=M
+resendBccContextMenuLabelSM=Rejtett másolat újraküldés->
+resendBccContextMenuAccesskeySM=R
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Üzenet küldése;Üzenetek küldése
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Biztos benne, hogy készen áll, hogy elküldeni ezt az üzenetet?;Biztos benne, hogy készen áll, hogy elküldeni ezeket az üzeneteket?
+sendMessageCheckSendButtonLabel=Küldés
+
+CheckMsg=Ne jelenjen meg többet ez a párbeszédpanel.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Az üzenet sikeresen elküldve;Üzenetek sikeresen elküldve
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Üzenet küldése nem sikerült;Üzenetek küldése nem sikerült
+
+#
+noRecipientsTitle=Üzenet átirányítás
+noRecipientsMessage=Nincs megadott címzettek. Kérjük, adja meg a címzett a címke területen.
+
+#
+noMessagesTitle=Üzenet átirányítás
+noMessagesMessage=Nincsenek kiválasztva üzenetek. Kérjük, add egy vagy több üzenetet az üzenet területen.
diff --git a/chrome/locale/hu/mailredirect-prefs.dtd b/chrome/locale/hu/mailredirect-prefs.dtd
new file mode 100644
index 0000000..b2ef48b
--- /dev/null
+++ b/chrome/locale/hu/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Üzenet átirányítás beállítások">
+
+<!ENTITY copyToSentMails.label "Üzenet átirányításkor az elküldött elemek mappába másolat elhelyezése?">
+<!ENTITY copyToSentMails.accesskey "á">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Ha ez az opció be van jelölve másolatát átirányított üzenet kerül az Elküldött mappába. Ha az opció nincs bejelölve másolata átirányított üzenet nem másolható bármelyik mappába.\nMegjegyzés: Ha ez az opció be van jelölve, és a beállítások a használt fiók átirányítása a „ne mentse az elküldött üzenetek minden” példányát átirányított üzenetek nem kerülnek mentésre sem.">
+
+<!ENTITY addToForwardAs.label "Átirányítás továbbítás módja menük és gombok hozzáadása">
+<!ENTITY addToForwardAs.accesskey "o">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Ha az átirányítás menükhöz és gombokhoz kapcsolja az átirányítást, az összes továbbítási műveletet egy elem alatt csoportosítja.\nA gombokat eltávolíthatja az eszköztárakból testreszabással és az alábbi opcióval ellenőrizheti, elrejtheti az önálló menüpontokat, mert feleslegessé váltak.">
+
+<!ENTITY hideRedirectMenuitems.label "Az átirányítás elrejtése menüpont az üzenet, az alkalmazás és a környezeti menük között">
+<!ENTITY hideRedirectMenuitems.accesskey "y">
+<!ENTITY hideRedirectMenuitems.tooltip "Elrejti az elkülönített átirányítás menüelemeket az üzenet, az alkalmazás és a környezeti menük között.">
+
+<!ENTITY concurrentConnections.label "Számú egyidejű SMTP kapcsolatok:">
+<!ENTITY concurrentConnections.accesskey "S">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "A beállítás megadja, hány kapcsolat jön létre, hogy az SMTP-kiszolgáló közben üzeneteket küldünk. Általában, ez lehetővé teszi, hogy növelje teljesítményét küldő folyamat, amikor úgy dönt, hogy irányítsa át hatalmas mennyiségű üzenet.\nMegjegyzés: Ha ezt a paramétert nullára nem korlátozza az egyidejű kapcsolatok vonatkoznak - legyen tisztában azzal, hogy milyen hatással lehetnek a stabilitás az SMTP szerver vagy küldését néhány üzenetet meghiúsulhat. Abban az esetben, ha bármilyen probléma ennek értéke egy.">
+
+<!ENTITY defaultRecipientsGroup.label "Alapértelmezett címzettek">
+
+<!ENTITY defaultResendTo.label "Címzett újraküldés:">
+<!ENTITY defaultResendTo.accesskey "C">
+<!ENTITY defaultResendTo.tooltip "Vesszővel elválasztott listája e-mail címeket.">
+
+<!ENTITY defaultResendCc.label "Másolat újraküldés:">
+<!ENTITY defaultResendCc.accesskey "M">
+<!ENTITY defaultResendCc.tooltip "Vesszővel elválasztott listája e-mail címeket.">
+
+<!ENTITY defaultResendBcc.label "Rejtett másolat újraküldés:">
+<!ENTITY defaultResendBcc.accesskey "R">
+<!ENTITY defaultResendBcc.tooltip "Vesszővel elválasztott listája e-mail címeket.">
+
+<!ENTITY defaultMode.label "Alapértelmezett mód:">
+<!ENTITY defaultMode.accesskey "A">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Válassza ki, hogyan szeretné átirányítani az üzeneteket alapértelmezés szerint.\nEz a beállítás csak akkor érvényesül, ha nem adott meg alapértelmezett címzettet.">
+<!ENTITY defaultModeResendTo.label "Címzett újraküldés">
+<!ENTITY defaultModeResendCc.label "Másolat újraküldés">
+<!ENTITY defaultModeResendBcc.label "Rejtett másolat újraküldés">
+
+<!ENTITY debug.label "Hibakeresés">
+<!ENTITY debug.accesskey "H">
+<!ENTITY debug.tooltip "Kapcsolja be / ki hibakeresést „Üzenet átirányítás” kiterjesztése. Naplók irányítjuk JavaScriptkonzol.">
+
+<!ENTITY saveConsoleContent.label2 "Hibakonzol tartalom mentése…">
+<!ENTITY saveConsoleContent.accesskey2 "t">
+<!ENTITY sendViaEmail.label "Email küldés keresztül">
+<!ENTITY sendViaEmail.accesskey "E">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Üzenet átirányítás beállítások">
diff --git a/chrome/locale/hu/mailredirect-prefs.properties b/chrome/locale/hu/mailredirect-prefs.properties
new file mode 100644
index 0000000..729443a
--- /dev/null
+++ b/chrome/locale/hu/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Üzenet átirányítás
+tempFileErrorDlogMessage=Ideiglenes fájl írása hibas.
+
+saveFile2=Hibakonzol tartalom mentése
diff --git a/chrome/locale/hu/mailredirect.dtd b/chrome/locale/hu/mailredirect.dtd
new file mode 100644
index 0000000..a7aa7ae
--- /dev/null
+++ b/chrome/locale/hu/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Átirányítás">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Kijelölt üzenetek átirányítása">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Átirányítás">
+<!ENTITY forwardAsRedirect.accesskey "i">
+<!ENTITY forwardAsRedirect.tooltip "Kijelölt üzenetek átirányítása">
diff --git a/chrome/locale/hu/mailredirect.properties b/chrome/locale/hu/mailredirect.properties
new file mode 100644
index 0000000..c598640
--- /dev/null
+++ b/chrome/locale/hu/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Üzenet átirányítás (Mail Redirect)
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Más címzettnek üzeneteket átirányítás.
diff --git a/chrome/locale/hu/msgHdrViewOverlay.dtd b/chrome/locale/hu/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..99a3512
--- /dev/null
+++ b/chrome/locale/hu/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Átirányítás">
+<!ENTITY hdrMailredirectButton1.tooltip "Az üzenet átirányítás küldése">
diff --git a/chrome/locale/id/mailredirect-compose.dtd b/chrome/locale/id/mailredirect-compose.dtd
new file mode 100644
index 0000000..dfce826
--- /dev/null
+++ b/chrome/locale/id/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "Berkas">
+<!ENTITY fileMenu.accesskey "B">
+<!ENTITY forwardBounce.label "Redirect">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Tutup">
+<!ENTITY closeCmd.accesskey "T">
+
+<!ENTITY viewMenu.label "Tampilan">
+<!ENTITY viewMenu.accesskey "T">
+<!ENTITY viewToolbarsMenuNew.label "Bilah Alat">
+<!ENTITY viewToolbarsMenuNew.accesskey "t">
+<!ENTITY menubarCmd.label "Bilah Menu">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Alat">
+<!ENTITY tasksMenu.accesskey "A">
+<!ENTITY messengerCmd.label "Email &amp; Newsgroup">
+<!ENTITY messengerCmd.accesskey "m">
+<!ENTITY addressBookCmd.label "Buku Alamat">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Redirect">
+<!ENTITY bounceButton.tooltip "Redirect pesan">
+<!ENTITY addressButton.label "Buku Alamat">
+<!ENTITY addressButton.tooltip "Pergi ke buku alamat">
+<!ENTITY throbberItem.title "Indikator Aktivitas">
+<!ENTITY throbber.tooltip "Pergi ke &amp; vendorShortName; halaman utama">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Ubahsuai…">
+<!ENTITY customizeToolbar.accesskey "U">
+<!ENTITY showBounceToolbarCmd.label "Redirect Bilah Alat">
+<!ENTITY showBounceToolbarCmd.accesskey "R">
+<!ENTITY showStatusbarCmd.label "Bilah Status">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "Bilah Samping Daftar Kenalan">
+<!ENTITY addressSidebar.accesskey "K">
+<!ENTITY addressesSidebarTitle.label "Kenalan">
+<!ENTITY addressSidebarButton.label "Kenalan">
+<!ENTITY addressSidebarButton.tooltip "Pilih penerima dari Buku Alamat">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 11em;">
+
+<!ENTITY resendFromAddr.label "Kirim kembali-Dari:">
+<!ENTITY resendFromAddr.accesskey "D">
+
+<!ENTITY resendToAddr.label "Kirim kembali-Ke:">
+<!ENTITY resendCcAddr.label "Kirim kembali-Cc:">
+<!ENTITY resendBccAddr.label "Kirim kembali-Bcc:">
+
+<!ENTITY bounceMailsLabel.label "Mengikuti mail akan diarahkan:">
+
+<!ENTITY subject.label "Subjek">
+<!ENTITY sender.label "Pengirim">
+<!ENTITY date.label "Tanggal">
diff --git a/chrome/locale/id/mailredirect-compose.properties b/chrome/locale/id/mailredirect-compose.properties
new file mode 100644
index 0000000..b6eaa8d
--- /dev/null
+++ b/chrome/locale/id/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Mail Redirect:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Terjadi kesalahan saat membuat jendela MailRedirect. Silakan coba lagi.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=0
+
+resendToContextMenuLabelTB=Menambah Kirim kembali-ke bidang
+resendToContextMenuAccesskeyTB=K
+resendCcContextMenuLabelTB=Tambahkan ke bidang kirim kembali-Cc
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Tambahkan ke bidang kirim kembali-Bcc
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=Menambah Kirim kembali-Ke\:
+resendToButtonAccesskey=A
+resendCcButtonLabel=Menambah Kirim kembali-Cc\:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Menambah Kirim kembali-Bcc\:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=Kirim kembali-Ke->
+resendToContextMenuAccesskeySM=K
+resendCcContextMenuLabelSM=Kirim kembali-Cc->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Kirim kembali-Bcc->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Kirim Pesan; Kirim Pesan
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Apakah Anda yakin Anda siap untuk mengirim pesan ini?
+sendMessageCheckSendButtonLabel=Kirim
+
+CheckMsg=Jangan tampilkan kotak dialog ini lagi.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Pesan dikirim berhasil
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Pesan pengiriman gagal
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=Tidak ada penerima yang ditentukan. Masukkan penerima di wilayah menangani.
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=Tidak ada pesan yang dipilih. Harap tambahkan satu atau lebih pesan ke daerah pesan.
diff --git a/chrome/locale/id/mailredirect-prefs.dtd b/chrome/locale/id/mailredirect-prefs.dtd
new file mode 100644
index 0000000..60423ea
--- /dev/null
+++ b/chrome/locale/id/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Pengaturan MailRedirect">
+
+<!ENTITY copyToSentMails.label "Tempat salinan surat diarahkan dalam folder Terkirim?">
+<!ENTITY copyToSentMails.accesskey "T">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Jika opsi ini dicentang, salinan pesan diarahkan ditempatkan dalam folder Terkirim. Jika opsi ini tidak dicentang, salinan pesan diarahkan tidak disalin ke folder apapun. \nCatatan: Jika opsi ini dicentang dan pengaturan Anda untuk akun yang digunakan untuk mengarahkan yang 'tidak menyimpan pesan yang dikirim sama sekali', salinan pesan diarahkan tidak akan disimpan baik.">
+
+<!ENTITY addToForwardAs.label "Tambah Redirect to Teruskan sebagai menu dan tombol">
+<!ENTITY addToForwardAs.accesskey "R">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Dengan menambahkan Redirect to the Teruskan sebagai menu dan tombol anda memasukkan seluruh tindakan penerusan dalam satu item. Anda dapat menghapus tombol dari toolbar dengan mengkostumisasinya dan dengan mencentang opsi dibawah, anda dapat menyembunyikan item menu terpisah jika menu tak terpakai.">
+
+<!ENTITY hideRedirectMenuitems.label "Sembunyikan menu Redirect dari Pesan, Aplikasi dan menu konteks">
+<!ENTITY hideRedirectMenuitems.accesskey "P">
+<!ENTITY hideRedirectMenuitems.tooltip "Sembunyikan item menu Redirect terpisah dari Pesan, Aplikasi dan menu konteks.">
+
+<!ENTITY concurrentConnections.label "Jumlah koneksi SMTP bersamaan:">
+<!ENTITY concurrentConnections.accesskey "J">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Pilihan menentukan jumlah koneksi yang akan dibentuk ke server SMTP Anda saat mengirim pesan. Secara umum, ini memungkinkan Anda untuk meningkatkan kinerja proses pengiriman ketika Anda memilih untuk mengarahkan sejumlah besar pesan. \nCatatan: Jika Anda menetapkan parameter ini ke nol tidak ada batas koneksi bersamaan akan berlaku - diperingatkan bahwa hal itu bisa berdampak pada stabilitas server SMTP Anda atau mengirim beberapa pesan bisa gagal. Dalam kasus masalah menetapkan nilai ini ke salah satu.">
+
+<!ENTITY defaultRecipientsGroup.label "Penerima default">
+
+<!ENTITY defaultResendTo.label "Kirim kembali-Ke:">
+<!ENTITY defaultResendTo.accesskey "K">
+<!ENTITY defaultResendTo.tooltip "Daftar alamat email dipisahkan dengan tanda koma.">
+
+<!ENTITY defaultResendCc.label "Kirim kembali-Cc:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Daftar alamat email dipisahkan dengan tanda koma.">
+
+<!ENTITY defaultResendBcc.label "Kirim kembali-Bcc:">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Daftar alamat email dipisahkan dengan tanda koma.">
+
+<!ENTITY defaultMode.label "Modus default:">
+<!ENTITY defaultMode.accesskey "M">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Memilih bagaimana Anda ingin mengarahkan pesan oleh default\n Pengaturan ini hanya memiliki efek bila Anda tidak ditentukan penerima default manapun.">
+<!ENTITY defaultModeResendTo.label "Kirim kembali-Ke">
+<!ENTITY defaultModeResendCc.label "Kirim kembali-Cc">
+<!ENTITY defaultModeResendBcc.label "Kirim kembali-Bcc">
+
+<!ENTITY debug.label "Debug">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Mengaktifkan/menonaktifkan debug perpanjangan mailredirect. Log diarahkan ke kesalahan konsol.">
+
+<!ENTITY saveConsoleContent.label2 "Simpan Kesalahan Konsol konten…">
+<!ENTITY saveConsoleContent.accesskey2 "S">
+<!ENTITY sendViaEmail.label "Kirim Melalui Email">
+<!ENTITY sendViaEmail.accesskey "E">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Redirect">
diff --git a/chrome/locale/id/mailredirect-prefs.properties b/chrome/locale/id/mailredirect-prefs.properties
new file mode 100644
index 0000000..8df94d0
--- /dev/null
+++ b/chrome/locale/id/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Kesalahan menulis file sementara.
+
+saveFile2=Simpan Kesalahan Console konten
diff --git a/chrome/locale/id/mailredirect.dtd b/chrome/locale/id/mailredirect.dtd
new file mode 100644
index 0000000..11dc647
--- /dev/null
+++ b/chrome/locale/id/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Redirect">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Mengarahkan pesan-pesan yang dipilih">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Redirect">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Mengarahkan pesan-pesan yang dipilih">
diff --git a/chrome/locale/id/mailredirect.properties b/chrome/locale/id/mailredirect.properties
new file mode 100644
index 0000000..4402b7e
--- /dev/null
+++ b/chrome/locale/id/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Memungkinkan untuk mengarahkan (a.k.a "remail") mail ke penerima lain.
diff --git a/chrome/locale/id/msgHdrViewOverlay.dtd b/chrome/locale/id/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..78eb9c4
--- /dev/null
+++ b/chrome/locale/id/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Redirect">
+<!ENTITY hdrMailredirectButton1.tooltip "Redirect pesan ini">
diff --git a/chrome/locale/it/mailredirect-compose.dtd b/chrome/locale/it/mailredirect-compose.dtd
new file mode 100644
index 0000000..cf82c84
--- /dev/null
+++ b/chrome/locale/it/mailredirect-compose.dtd
@@ -0,0 +1,70 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "File">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Reindirizza…">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Chiudi">
+<!ENTITY closeCmd.accesskey "C">
+
+<!ENTITY viewMenu.label "Visualizza">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Barra degli strumenti">
+<!ENTITY viewToolbarsMenuNew.accesskey "B">
+<!ENTITY menubarCmd.label "Barra dei menu">
+<!ENTITY menubarCmd.accesskey "m">
+
+<!ENTITY tasksMenu.label "Strumenti">
+<!ENTITY tasksMenu.accesskey "S">
+<!ENTITY messengerCmd.label "Posta e gruppi di discussione">
+<!ENTITY messengerCmd.accesskey "P">
+<!ENTITY addressBookCmd.label "Rubrica">
+<!ENTITY addressBookCmd.accesskey "R">
+
+<!ENTITY bounceButton.label "Reindirizza…">
+<!ENTITY bounceButton.tooltip "Reindirizza i messaggi selezionati">
+<!ENTITY addressButton.label "Rubrica">
+<!ENTITY addressButton.tooltip "Apri la rubrica">
+<!ENTITY throbberItem.title "Indicatore di attività">
+<!ENTITY throbber.tooltip "Visita il sito web di &vendorShortName;">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "2">
+<!ENTITY addressBookCmd.modifiers "accel">
+
+<!ENTITY customizeToolbar.label "Personalizza…">
+<!ENTITY customizeToolbar.accesskey "P">
+<!ENTITY showBounceToolbarCmd.label "Barra di reindirizzamento">
+<!ENTITY showBounceToolbarCmd.accesskey "i">
+<!ENTITY showStatusbarCmd.label "Barra di stato">
+<!ENTITY showStatusbarCmd.accesskey "t">
+
+<!ENTITY addressSidebar.label "Barra laterale dei contatti">
+<!ENTITY addressSidebar.accesskey "o">
+<!ENTITY addressesSidebarTitle.label "Contatti">
+<!ENTITY addressSidebarButton.label "Contatti">
+<!ENTITY addressSidebarButton.tooltip "Selezionare il destinatario da una delle rubriche">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+
+<!ENTITY headersSpace.style "width: 12em;">
+
+<!ENTITY resendFromAddr.label "Account:">
+<!ENTITY resendFromAddr.accesskey "A">
+
+<!ENTITY resendToAddr.label "Reindirizza a:">
+<!ENTITY resendCcAddr.label "Reindirizza in Cc a:">
+<!ENTITY resendBccAddr.label "Reindirizza in Ccn a:">
+
+<!ENTITY bounceMailsLabel.label "I seguenti messaggi verranno reindirizzati:">
+
+<!ENTITY subject.label "Oggetto">
+<!ENTITY sender.label "Mittente">
+<!ENTITY date.label "Data">
diff --git a/chrome/locale/it/mailredirect-compose.properties b/chrome/locale/it/mailredirect-compose.properties
new file mode 100644
index 0000000..9c3a9e3
--- /dev/null
+++ b/chrome/locale/it/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Mail Redirect:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=Errore durante la creazione della finestra di MailRedirect. Riprovare.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Aggiungi al campo 'Reindirizza a'
+resendToContextMenuAccesskeyTB=a
+resendCcContextMenuLabelTB=Aggiungi al campo 'Reindirizza in Cc a'
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Aggiungi al campo 'Reindirizza in Ccn a'
+resendBccContextMenuAccesskeyTB=n
+resendToButtonLabel=Aggiungi a 'Reindirizza a:'
+resendToButtonAccesskey=a
+resendCcButtonLabel=Aggiungi a 'Reindirizza in Cc a:'
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Aggiungi a 'Reindirizza in Ccn a:'
+resendBccButtonAccesskey=n
+resendToContextMenuLabelSM=Reindirizza a->
+resendToContextMenuAccesskeySM=a
+resendCcContextMenuLabelSM=Reindirizza in Cc a->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Reindirizza in Ccn a->
+resendBccContextMenuAccesskeySM=n
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Invia il messaggio;Invia i messaggi
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Inviare questo messaggio?;Inviare questi messaggi?
+sendMessageCheckSendButtonLabel=Invia
+
+CheckMsg=Non visualizzare questo avviso in futuro
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Messaggio inviato con successo;Messaggi inviati con successo
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Invio del messaggio non riuscito;Invio dei messaggi non riuscito
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=Non è stato specificato alcun destinatario. Inserire un destinatario nel campo indirizzo
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=Non è stato selezionato alcun messaggio. Aggiungerne uno o più all'area dei messaggi
diff --git a/chrome/locale/it/mailredirect-prefs.dtd b/chrome/locale/it/mailredirect-prefs.dtd
new file mode 100644
index 0000000..02c0a81
--- /dev/null
+++ b/chrome/locale/it/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Opzioni di MailRedirect">
+
+<!ENTITY copyToSentMails.label "Lasciare una copia del messaggio reindirizzato nella cartella Posta inviata?">
+<!ENTITY copyToSentMails.accesskey "c">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Se questa opzione è selezionata, viene lasciata una copia del messaggio reindirizzato nella cartella della posta inviata. Deselezionando tale opzione non viene effettuata alcuna copia del messaggio reindirizzato\nNota: se questa opzione è selezionata e le impostazioni dell'account usato per il reindirizzamento sono 'non salvare i messaggi' in nessun caso verranno salvate copie dei messaggi reindirizzati">
+
+<!ENTITY addToForwardAs.label "Aggiunge Reindirizza al menu e ai pulsanti di 'Inoltra come'">
+<!ENTITY addToForwardAs.accesskey "A">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Aggiungendo Reindirizza al menu e ai pulsanti di 'Inoltra come' si raggruppano tutte le funzioni di inoltro dei messaggi sotto un'unica voce.\nÈ così possibile rimuovere i pulsanti dalle barre degli strumenti personalizzandoli e, selezionando l'opzione sottostante è anche possibile nascondere le singole voci di menu essendo queste diventate ridondanti">
+
+<!ENTITY hideRedirectMenuitems.label "Nasconde la voce Reindirizza dai menu Messaggio, Applicazione e dal menu contestuale">
+<!ENTITY hideRedirectMenuitems.accesskey "N">
+<!ENTITY hideRedirectMenuitems.tooltip "Nasconde le singole voci del menu Reindirizza dai menu Messaggio, Applicazione e dal menu contestuale">
+
+<!ENTITY concurrentConnections.label "Numero di connessioni SMTP simultanee:">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Questa opzione specifica il numero di connessioni SMTP che si creano durante l'invio dei messaggi. In generale, questo consente di potenziare il processo di invio qualora si debba reindirizzare una notevole quantità di messaggi\nNota: impostando come parametro lo zero (0) il numero di connessioni simultanee sarà illimitato - si noti però che questa impostazione potrebbe rendere instabile il server SMTP e non consentire l'invio di alcuni messaggi. Nel caso insorgessero dei problemi si consiglia di impostare questo parametro a uno (1)">
+
+<!ENTITY defaultRecipientsGroup.label "Destinatari predefiniti">
+
+<!ENTITY defaultResendTo.label "Reindirizza a:">
+<!ENTITY defaultResendTo.accesskey "R">
+<!ENTITY defaultResendTo.tooltip "Elenco di indirizzi e-mail (separati da virgola) ai quali reindirizzare i messaggi di posta">
+
+<!ENTITY defaultResendCc.label "Reindirizza in Cc a:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Elenco di indirizzi e-mail (separati da virgola) ai quali reindirizzare in copia carbone i messaggi di posta">
+
+<!ENTITY defaultResendBcc.label "Reindirizza in Ccn a:">
+<!ENTITY defaultResendBcc.accesskey "a">
+<!ENTITY defaultResendBcc.tooltip "Elenco di indirizzi e-mail (separati da virgola) ai quali reindirizzare in copia carbone nascosta i messaggi di posta">
+
+<!ENTITY defaultMode.label "Modo predefinito:">
+<!ENTITY defaultMode.accesskey "M">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Selezionare quale metodo utilizzare per reindirizzare i messaggi\nNota: questa opzione ha effetto solo quando non viene specificato alcun destinatario">
+<!ENTITY defaultModeResendTo.label "Reindirizza a:">
+<!ENTITY defaultModeResendCc.label "Reindirizza in Cc a:">
+<!ENTITY defaultModeResendBcc.label "Reindirizza in Ccn a:">
+
+<!ENTITY debug.label "Attiva/disattiva il debug">
+<!ENTITY debug.accesskey "d">
+<!ENTITY debug.tooltip "Attiva/disattiva il debug degli errori per MailRedirect. La registrazione degli errori verrà salvata nella console JavaScript">
+
+<!ENTITY saveConsoleContent.label2 "Salva il contenuto della console degli errori…">
+<!ENTITY saveConsoleContent.accesskey2 "S">
+<!ENTITY sendViaEmail.label "Invia tramite e-mail">
+<!ENTITY sendViaEmail.accesskey "e">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/it/mailredirect-prefs.properties b/chrome/locale/it/mailredirect-prefs.properties
new file mode 100644
index 0000000..3ee8b3f
--- /dev/null
+++ b/chrome/locale/it/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=Errore di scrittura sul file temporaneo.
+
+saveFile2=Salva il contenuto della console degli errori
diff --git a/chrome/locale/it/mailredirect.dtd b/chrome/locale/it/mailredirect.dtd
new file mode 100644
index 0000000..25d673a
--- /dev/null
+++ b/chrome/locale/it/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Reindirizza…">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Reindirizza i messaggi selezionati">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Reindirizza…">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "Reindirizza il messaggio selezionato">
diff --git a/chrome/locale/it/mailredirect.properties b/chrome/locale/it/mailredirect.properties
new file mode 100644
index 0000000..2ab9367
--- /dev/null
+++ b/chrome/locale/it/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Consente di reindirizzare i messaggi di posta elettronica
diff --git a/chrome/locale/it/msgHdrViewOverlay.dtd b/chrome/locale/it/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..3134d4b
--- /dev/null
+++ b/chrome/locale/it/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Reindirizza…">
+<!ENTITY hdrMailredirectButton1.tooltip "Reindirizza questo messaggio">
diff --git a/chrome/locale/ja/mailredirect-compose.dtd b/chrome/locale/ja/mailredirect-compose.dtd
new file mode 100644
index 0000000..dbe43a5
--- /dev/null
+++ b/chrome/locale/ja/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Mail Redirect">
+
+<!ENTITY fileMenu.label "ファイル">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "リダイレクト">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "閉じる">
+<!ENTITY closeCmd.accesskey "C">
+
+<!ENTITY viewMenu.label "表示">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "ツールバー">
+<!ENTITY viewToolbarsMenuNew.accesskey "T">
+<!ENTITY menubarCmd.label "メニューバー">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "ツール">
+<!ENTITY tasksMenu.accesskey "T">
+<!ENTITY messengerCmd.label "メール &amp; ニュースグループ">
+<!ENTITY messengerCmd.accesskey "M">
+<!ENTITY addressBookCmd.label "アドレス帳">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "リダイレクト">
+<!ENTITY bounceButton.tooltip "メッセージをリダイレクトします">
+<!ENTITY addressButton.label "アドレス帳">
+<!ENTITY addressButton.tooltip "アドレス帳に移動します">
+<!ENTITY throbberItem.title "アクティブインジケーター">
+<!ENTITY throbber.tooltip "&vendorShortName; のホームページに移動します">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "カスタマイズ...">
+<!ENTITY customizeToolbar.accesskey "C">
+<!ENTITY showBounceToolbarCmd.label "リダイレクト ツールバー">
+<!ENTITY showBounceToolbarCmd.accesskey "o">
+<!ENTITY showStatusbarCmd.label "ステータス バー">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "アドレスサイドバー">
+<!ENTITY addressSidebar.accesskey "o">
+<!ENTITY addressesSidebarTitle.label "連絡先">
+<!ENTITY addressSidebarButton.label "連絡先">
+<!ENTITY addressSidebarButton.tooltip "アドレス帳から受信者を選択してください">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 10em;">
+
+<!ENTITY resendFromAddr.label "再送信元:">
+<!ENTITY resendFromAddr.accesskey "R">
+
+<!ENTITY resendToAddr.label "再送信先:">
+<!ENTITY resendCcAddr.label "再送信先(Cc):">
+<!ENTITY resendBccAddr.label "再送信先(Bcc):">
+
+<!ENTITY bounceMailsLabel.label "以下のメールがリダイレクトされます:">
+
+<!ENTITY subject.label "件名">
+<!ENTITY sender.label "差出人">
+<!ENTITY date.label "日付">
diff --git a/chrome/locale/ja/mailredirect-compose.properties b/chrome/locale/ja/mailredirect-compose.properties
new file mode 100644
index 0000000..b557199
--- /dev/null
+++ b/chrome/locale/ja/mailredirect-compose.properties
@@ -0,0 +1,55 @@
+
+mailredirectWindowTitlePrefix=Mail Redirect:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Mail Redirect
+initErrorDlogMessage=MailRedirect ウィンドウ作成時にエラーが発生しました。もう一度やり直してください。
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=0
+
+resendToContextMenuLabelTB=再送信先フィールドに追加
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=再送信先(Cc)フィールドに追加
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=再送信先(Bcc)フィールドに追加
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=再送信先に追加:
+resendToButtonAccesskey=A
+resendCcButtonLabel=再送信先(Cc)に追加:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=再送信先(Bcc)に追加:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=再送信先->
+resendToContextMenuAccesskeySM=T
+resendCcContextMenuLabelSM=再送信先(Cc)->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=再送信先(Bcc)->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=メッセージの送信
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=メッセージを送信してもよろしいですか?
+sendMessageCheckSendButtonLabel=送信
+
+CheckMsg=このダイアログを次からは表示しない。
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=メッセージの送信に成功しました
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=メッセージの送信に失敗しました
+
+#
+noRecipientsTitle=Mail Redirect
+noRecipientsMessage=宛先が指定されていません。宛先欄にアドレスを入力してください。
+
+#
+noMessagesTitle=Mail Redirect
+noMessagesMessage=メッセージが選択されていません。メッセージエリアに1つ以上のメッセージを追加してください。
diff --git a/chrome/locale/ja/mailredirect-prefs.dtd b/chrome/locale/ja/mailredirect-prefs.dtd
new file mode 100644
index 0000000..ed115b1
--- /dev/null
+++ b/chrome/locale/ja/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Mail Redirect の設定">
+
+<!ENTITY copyToSentMails.label "リダイレクトしたメールのコピーを送信済みトレイに保存する">
+<!ENTITY copyToSentMails.accesskey "c">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "このオプションにチェックを入れると、リダイレクトしたメッセージを送信済みトレイにコピーします。チェックを外すと、どのフォルダーにもコピーされません。\n注意:チェックが入っている場合でも、アカウント設定で「メッセージ送信時に自動的にコピーを作成する」が設定されていない場合はリダイレクトしたメッセージもコピーされません。">
+
+<!ENTITY addToForwardAs.label "リダイレクトを [形式を指定して転送] メニューとボタンに追加する">
+<!ENTITY addToForwardAs.accesskey "A">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "リダイレクトを [形式を指定して転送] メニューおよびボタンに追加することにより、すべての転送操作を一つにまとめられます。\nツールバーをカスタマイズしてボタンを削除し、下のオプションにチェックを入れることにより、冗長な別のメニュー項目を隠すことができます。">
+
+<!ENTITY hideRedirectMenuitems.label "リダイレクトメニュー項目を [メッセージ] メニュー、[アプリケーション] メニュー、コンテキストメニューから隠す">
+<!ENTITY hideRedirectMenuitems.accesskey "H">
+<!ENTITY hideRedirectMenuitems.tooltip "別のリダイレクトメニュー項目を [メッセージ] メニュー、[アプリケーション] メニュー、コンテキストメニューから隠します。">
+
+<!ENTITY concurrentConnections.label "同時 SMTP 接続数:">
+<!ENTITY concurrentConnections.accesskey "N">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "このオプションでは、メッセージの送信中に確立する SMTP サーバーへの接続数を指定します。一般に、大量のメッセージをリダイレクトする際の送信処理能力を向上させることができます。\n注意:この値を 0 に設定すると同時接続数の制限が解除されますが、SMTP サーバーの安定性に影響を与え、メッセージの送信に失敗することがあります。失敗する場合にはこの値を 1 に設定してください。">
+
+<!ENTITY defaultRecipientsGroup.label "既定の受信者">
+
+<!ENTITY defaultResendTo.label "再送信先:">
+<!ENTITY defaultResendTo.accesskey "T">
+<!ENTITY defaultResendTo.tooltip "メールアドレスをカンマ区切りで入力">
+
+<!ENTITY defaultResendCc.label "再送信先(Cc):">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "複数のメールアドレスはカンマで区切ってください。">
+
+<!ENTITY defaultResendBcc.label "再送信先(Bcc):">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "複数のメールアドレスはカンマで区切ってください。">
+
+<!ENTITY defaultMode.label "既定のモード:">
+<!ENTITY defaultMode.accesskey "m">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "既定のメッセージのリダイレクト方法を選んでください。\nこの設定は既定の受信者を指定していない場合にのみ効果があります。">
+<!ENTITY defaultModeResendTo.label "再送信先">
+<!ENTITY defaultModeResendCc.label "再送信先(Cc)">
+<!ENTITY defaultModeResendBcc.label "再送信先(Bcc)">
+
+<!ENTITY debug.label "デバッグ">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Mail Redirect 拡張機能のデバッグのオン/オフを切り替えます。ログはエラーコンソールに表示されます。">
+
+<!ENTITY saveConsoleContent.label2 "エラーコンソールの内容を保存…">
+<!ENTITY saveConsoleContent.accesskey2 "S">
+<!ENTITY sendViaEmail.label "メールで送信">
+<!ENTITY sendViaEmail.accesskey "e">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Mail Redirect">
diff --git a/chrome/locale/ja/mailredirect-prefs.properties b/chrome/locale/ja/mailredirect-prefs.properties
new file mode 100644
index 0000000..7e0ec79
--- /dev/null
+++ b/chrome/locale/ja/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Mail Redirect
+tempFileErrorDlogMessage=一時ファイルへの書き込み時にエラーが発生しました。
+
+saveFile2=エラーコンソールの内容を保存
diff --git a/chrome/locale/ja/mailredirect.dtd b/chrome/locale/ja/mailredirect.dtd
new file mode 100644
index 0000000..dc1bc7a
--- /dev/null
+++ b/chrome/locale/ja/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "リダイレクト">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "選択したメッセージをリダイレクトします">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "リダイレクト">
+<!ENTITY forwardAsRedirect.accesskey "R">
+<!ENTITY forwardAsRedirect.tooltip "選択したメッセージをリダイレクトします">
diff --git a/chrome/locale/ja/mailredirect.properties b/chrome/locale/ja/mailredirect.properties
new file mode 100644
index 0000000..de3d262
--- /dev/null
+++ b/chrome/locale/ja/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=他の受信者にメール メッセージをリダイレクト(または"バウンス(remail)")することを可能にします。
diff --git a/chrome/locale/ja/msgHdrViewOverlay.dtd b/chrome/locale/ja/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..a6e73b3
--- /dev/null
+++ b/chrome/locale/ja/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "リダイレクト">
+<!ENTITY hdrMailredirectButton1.tooltip "このメッセージをリダイレクトします">
diff --git a/chrome/locale/lt/mailredirect-compose.dtd b/chrome/locale/lt/mailredirect-compose.dtd
new file mode 100644
index 0000000..2e9bd03
--- /dev/null
+++ b/chrome/locale/lt/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Laiškų nukreipimas">
+
+<!ENTITY fileMenu.label "Failas">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Nukreipti">
+<!ENTITY forwardBounce.accesskey "k">
+<!ENTITY closeCmd.label "Užverti">
+<!ENTITY closeCmd.accesskey "U">
+
+<!ENTITY viewMenu.label "Rodymas">
+<!ENTITY viewMenu.accesskey "R">
+<!ENTITY viewToolbarsMenuNew.label "Priemonių juostos">
+<!ENTITY viewToolbarsMenuNew.accesskey "j">
+<!ENTITY menubarCmd.label "Meniu juosta">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Priemonės">
+<!ENTITY tasksMenu.accesskey "P">
+<!ENTITY messengerCmd.label "Paštas ir naujienų grupės">
+<!ENTITY messengerCmd.accesskey "P">
+<!ENTITY addressBookCmd.label "Adresų knyga">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Nukreipti">
+<!ENTITY bounceButton.tooltip "Nukreipti laiškus">
+<!ENTITY addressButton.label "Adresai">
+<!ENTITY addressButton.tooltip "Eiti į adresų knygą">
+<!ENTITY throbberItem.title "Aktyvumo rodiklis">
+<!ENTITY throbber.tooltip "Atverti „&vendorShortName;“ tinklalapį">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Tvarkyti…">
+<!ENTITY customizeToolbar.accesskey "T">
+<!ENTITY showBounceToolbarCmd.label "Nukreipimo mygtukų juosta">
+<!ENTITY showBounceToolbarCmd.accesskey "N">
+<!ENTITY showStatusbarCmd.label "Būsenos juosta">
+<!ENTITY showStatusbarCmd.accesskey "B">
+
+<!ENTITY addressSidebar.label "Parankinė (adresatai)">
+<!ENTITY addressSidebar.accesskey "r">
+<!ENTITY addressesSidebarTitle.label "Adresatai">
+<!ENTITY addressSidebarButton.label "Adresatai">
+<!ENTITY addressSidebarButton.tooltip "Parinkti gavėjus iš adresų knygos">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 9em;">
+
+<!ENTITY resendFromAddr.label "Nukreipė:">
+<!ENTITY resendFromAddr.accesskey "N">
+
+<!ENTITY resendToAddr.label "Nukreipti kam:">
+<!ENTITY resendCcAddr.label "Nukreipti kopiją:">
+<!ENTITY resendBccAddr.label "Nukreipti nematomąją kopiją:">
+
+<!ENTITY bounceMailsLabel.label "Bus nukreipti šie elektroniniai laiškai:">
+
+<!ENTITY subject.label "Tema">
+<!ENTITY sender.label "Siuntėjas">
+<!ENTITY date.label "Data">
diff --git a/chrome/locale/lt/mailredirect-compose.properties b/chrome/locale/lt/mailredirect-compose.properties
new file mode 100644
index 0000000..b2da2d0
--- /dev/null
+++ b/chrome/locale/lt/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Laiškų nukreipimas:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Laiškų nukreipimas
+initErrorDlogMessage=Nepavyko atverti laiško nukreipimo lango. Pamėginkite dar kartą.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=6
+
+resendToContextMenuLabelTB=Pridėti į lauką „Nukreipti kam“
+resendToContextMenuAccesskeyTB=P
+resendCcContextMenuLabelTB=Pridėti į lauką „Nukreipti kopiją“
+resendCcContextMenuAccesskeyTB=k
+resendBccContextMenuLabelTB=Pridėti į lauką „Nukreipti nematomąją kopiją“
+resendBccContextMenuAccesskeyTB=n
+resendToButtonLabel=Pridėti į „Nukreipti kam“
+resendToButtonAccesskey=P
+resendCcButtonLabel=Pridėti į „Nukreipti kopiją“
+resendCcButtonAccesskey=k
+resendBccButtonLabel=Pridėti į „Nukreipti nematomąją kopiją“
+resendBccButtonAccesskey=n
+resendToContextMenuLabelSM=Nukreipti kam->
+resendToContextMenuAccesskeySM=N
+resendCcContextMenuLabelSM=Nukreipti kopiją->
+resendCcContextMenuAccesskeySM=k
+resendBccContextMenuLabelSM=Nukreipti nematomąją kopiją->
+resendBccContextMenuAccesskeySM=u
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Laiško siuntimas;Laiškų siuntimas;Laiškų siuntimas
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Ar norite išsiųsti šį laišką (laiškus)?;Ar norite išsiųsti šiuos laiškus?;Ar norite išsiųsti šiuos laiškus?
+sendMessageCheckSendButtonLabel=Siųsti
+
+CheckMsg=Ateityje šio klausimo nepateikti.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Laiškas (-ai) išsiųstas (-i);Laiškai išsiųsti;Laiškai išsiųsti
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Laiško (-ų) išsiųsti nepavyko;Laiškų išsiųsti nepavyko;Laiškų išsiųsti nepavyko
+
+#
+noRecipientsTitle=Laiškų nukreipimas
+noRecipientsMessage=Nenurodyti gavėjai. Prieš siųsdami, turite bent vieną nurodyti.
+
+#
+noMessagesTitle=Laiškų nukreipimas
+noMessagesMessage=Neparinkti nukreiptini laiškai. Pridėkite bent vieną laišką, kurį norite nukreipti.
diff --git a/chrome/locale/lt/mailredirect-prefs.dtd b/chrome/locale/lt/mailredirect-prefs.dtd
new file mode 100644
index 0000000..adc6554
--- /dev/null
+++ b/chrome/locale/lt/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Laiškų nukreipimo nuostatos">
+
+<!ENTITY copyToSentMails.label "Įrašyti nukreipiamų laiškų kopijas išsiųstų laiškų aplanke">
+<!ENTITY copyToSentMails.accesskey "a">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Pažymėjus šią parinktį, į išsiųstų laiškų aplanką bus įrašomos visų nukreipiamų laiškų kopijos. Nepažymėjus, kopija nebus įrašoma.\nPastaba: jei ši parinktis pažymėta, tačiau nukreipimui naudojamos paskyros nuostatose nepasirinkta, kad laiškai būtų įrašomi, ši parinktis taip pat negalioja.">
+
+<!ENTITY addToForwardAs.label "Pridėti parinktį „Nukreipti“ į pasirinktinio persiuntimo meniu ir mygtukų meniu">
+<!ENTITY addToForwardAs.accesskey "m">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Pridėjus nukreipimo parinktį į pasirinktinio persiuntimo meniu ir atitinkamų mygtukų meniu, visos persiuntimo parinktys bus sugrupuotos vienoje vietoje.\nAtskirus nukreipimo mygtukus tuomet galėsite paslėpti, tvarkydami atitinkamas įrankių juostas, o atskirus meniu elementus – pažymėdami parinktį žemiau.">
+
+<!ENTITY hideRedirectMenuitems.label "Nerodyti atskirų meniu elementų laiško, programos ir kontekstiniuose meniu">
+<!ENTITY hideRedirectMenuitems.accesskey "d">
+<!ENTITY hideRedirectMenuitems.tooltip "Pažymėjus šią parinktį, nebus rodomi savarankiški laiško, programos ir kontekstinio meniu punktai, suteikiantys galimybę nukreipti laišką.">
+
+<!ENTITY concurrentConnections.label "Lygiagrečių SMTP ryšių skaičius:">
+<!ENTITY concurrentConnections.accesskey "S">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Čia galite nurodyti, kiek lygiagrečių ryšio seansų bus užmezgiama siunčiant laiškuis. Bendruoju atveju tai gali padėi išsiųsti laiškus greičiau, jei pasirenkate nukreipti labai didelį jų kiekį.\nPastaba: jei čia įrašysite nulį, išeinantiems ryšiams apribojimai nebus taikomi, o tai gali neigiamai įtakoti jūsų SMTP serverio stabilumą, arba dalies laiškų gali nepavykti išsiųsti. Jei iškiltų problemų, čia įveskite vienetą.">
+
+<!ENTITY defaultRecipientsGroup.label "Numatytieji gavėjai">
+
+<!ENTITY defaultResendTo.label "Nukreipti kam:">
+<!ENTITY defaultResendTo.accesskey "k">
+<!ENTITY defaultResendTo.tooltip "Atskirkite adresatus kableliais.">
+
+<!ENTITY defaultResendCc.label "Nukreipti kopiją:">
+<!ENTITY defaultResendCc.accesskey "o">
+<!ENTITY defaultResendCc.tooltip "Atskirkite adresatus kableliais.">
+
+<!ENTITY defaultResendBcc.label "Nukreipti nematomąją kopiją:">
+<!ENTITY defaultResendBcc.accesskey "n">
+<!ENTITY defaultResendBcc.tooltip "Atskirkite adresatus kableliais.">
+
+<!ENTITY defaultMode.label "Numatytoji veiksena:">
+<!ENTITY defaultMode.accesskey "u">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Pasirinkite numatytąjį nukreipimo būdą\.nŠi parinktis nieko neįtakoja, jei aukščiau yra nurodytas bent vienas numatytasis gavėjas.">
+<!ENTITY defaultModeResendTo.label "Nukreipti tiesiogiai">
+<!ENTITY defaultModeResendCc.label "Nukreipti kopiją">
+<!ENTITY defaultModeResendBcc.label "Nukreipti nematomąją kopiją">
+
+<!ENTITY debug.label "Derinimo veiksena">
+<!ENTITY debug.accesskey "D">
+<!ENTITY debug.tooltip "Įjungti „Mail Redirect“ priedo derinimą. Žurnalas nukreipiamas į klaidų pultą.">
+
+<!ENTITY saveConsoleContent.label2 "Įrašyti klaidų pulto turinį…">
+<!ENTITY saveConsoleContent.accesskey2 "š">
+<!ENTITY sendViaEmail.label "Išsiųsti el. paštu">
+<!ENTITY sendViaEmail.accesskey "I">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Laiškų nukreipimas">
diff --git a/chrome/locale/lt/mailredirect-prefs.properties b/chrome/locale/lt/mailredirect-prefs.properties
new file mode 100644
index 0000000..c9036da
--- /dev/null
+++ b/chrome/locale/lt/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Laiškų nukreipimas
+tempFileErrorDlogMessage=Klaida įrašant laikinąjį failą.
+
+saveFile2=Klaidų pulto turinio įrašymas
diff --git a/chrome/locale/lt/mailredirect.dtd b/chrome/locale/lt/mailredirect.dtd
new file mode 100644
index 0000000..052988d
--- /dev/null
+++ b/chrome/locale/lt/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Nukreipti">
+<!ENTITY bounceCommand.accesskey "k">
+<!ENTITY bounceCommand.tooltip "Nukreipti pažymėtus laiškus kitu adresu">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Nukreipti">
+<!ENTITY forwardAsRedirect.accesskey "N">
+<!ENTITY forwardAsRedirect.tooltip "Nukreipti pažymėtą laišką kitu adresu">
diff --git a/chrome/locale/lt/mailredirect.properties b/chrome/locale/lt/mailredirect.properties
new file mode 100644
index 0000000..70b5db2
--- /dev/null
+++ b/chrome/locale/lt/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Laiškų nukreipimas (Mail Redirect)
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Suteikia galimybę nukreipti (persiųsti) gautus laiškus kitiems adresatams, nekeičiant antraštės „Kam“.
diff --git a/chrome/locale/lt/msgHdrViewOverlay.dtd b/chrome/locale/lt/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..793a1bd
--- /dev/null
+++ b/chrome/locale/lt/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Nukreipti">
+<!ENTITY hdrMailredirectButton1.tooltip "Nukreipti šį pranešimą kitu adresu">
diff --git a/chrome/locale/nb/mailredirect-compose.dtd b/chrome/locale/nb/mailredirect-compose.dtd
new file mode 100644
index 0000000..0b160e4
--- /dev/null
+++ b/chrome/locale/nb/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Post omdirigering">
+
+<!ENTITY fileMenu.label "Fil">
+<!ENTITY fileMenu.accesskey "F">
+<!ENTITY forwardBounce.label "Omdiriger">
+<!ENTITY forwardBounce.accesskey "i">
+<!ENTITY closeCmd.label "Lukk">
+<!ENTITY closeCmd.accesskey "L">
+
+<!ENTITY viewMenu.label "Vis">
+<!ENTITY viewMenu.accesskey "V">
+<!ENTITY viewToolbarsMenuNew.label "Verktøylinjer">
+<!ENTITY viewToolbarsMenuNew.accesskey "V">
+<!ENTITY menubarCmd.label "Menylinje">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Verktøy">
+<!ENTITY tasksMenu.accesskey "e">
+<!ENTITY messengerCmd.label "E-post &amp; nyhetsgrupper">
+<!ENTITY messengerCmd.accesskey "E">
+<!ENTITY addressBookCmd.label "Adressebok">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Omdiriger">
+<!ENTITY bounceButton.tooltip "Omdiriger meldinger">
+<!ENTITY addressButton.label "Adressebok">
+<!ENTITY addressButton.tooltip "Gå til adresseboken">
+<!ENTITY throbberItem.title "Aktivitetsindikator">
+<!ENTITY throbber.tooltip "Gå til &vendorShortName; hjemmeside">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Tilpass…">
+<!ENTITY customizeToolbar.accesskey "C">
+<!ENTITY showBounceToolbarCmd.label "Omdiriger verktøylinje">
+<!ENTITY showBounceToolbarCmd.accesskey "O">
+<!ENTITY showStatusbarCmd.label "Statuslinje">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "Adressebok i sidestolpe">
+<!ENTITY addressSidebar.accesskey "A">
+<!ENTITY addressesSidebarTitle.label "Kontakter">
+<!ENTITY addressSidebarButton.label "Kontakter">
+<!ENTITY addressSidebarButton.tooltip "Velg en mottaker fra en adressebok">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 9em;">
+
+<!ENTITY resendFromAddr.label "Send igjen fra:">
+<!ENTITY resendFromAddr.accesskey "R">
+
+<!ENTITY resendToAddr.label "Send igjen til:">
+<!ENTITY resendCcAddr.label "Send igjen Cc:">
+<!ENTITY resendBccAddr.label "Send blindkopi på nytt:">
+
+<!ENTITY bounceMailsLabel.label "Følgende e-poster vil bli omdirigert:">
+
+<!ENTITY subject.label "Emne">
+<!ENTITY sender.label "Avsender">
+<!ENTITY date.label "Dato">
diff --git a/chrome/locale/nb/mailredirect-compose.properties b/chrome/locale/nb/mailredirect-compose.properties
new file mode 100644
index 0000000..66570c7
--- /dev/null
+++ b/chrome/locale/nb/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Post omdirigering:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Post omdirigering
+initErrorDlogMessage=Det oppstod en feil under oppretting av MailRedirect-vinduet. Prøv på nytt.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Legge til Send igjen-til-feltet
+resendToContextMenuAccesskeyTB=L
+resendCcContextMenuLabelTB=Legge til Send-kopi-igjen-feltet
+resendCcContextMenuAccesskeyTB=k
+resendBccContextMenuLabelTB=Legge til Send-blindkopi-igjen-feltet
+resendBccContextMenuAccesskeyTB=b
+resendToButtonLabel=Legge til Send igjen til:
+resendToButtonAccesskey=L
+resendCcButtonLabel=Legge til Send-kopi-igjen:
+resendCcButtonAccesskey=k
+resendBccButtonLabel=Legge til Send-blindkopi-igjen:
+resendBccButtonAccesskey=b
+resendToContextMenuLabelSM=Send igjen til->
+resendToContextMenuAccesskeySM=S
+resendCcContextMenuLabelSM=Send igjen Cc->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Send Blindkopi igjen->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Send melding;Send meldinger
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Er du sikker på at du er klar til å sende denne meldingen?;Er du sikker på at du er klar til å sende disse meldingene?
+sendMessageCheckSendButtonLabel=Send
+
+CheckMsg=Ikke vis meg denne dialogboksen igjen.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Meldingen sendt;Meldinger sendt
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Sending av melding mislyktes;Sending av meldinger mislyktes
+
+#
+noRecipientsTitle=Post omdirigering
+noRecipientsMessage=Ingen mottakere ble angitt. Angi en mottaker i adressefeltet.
+
+#
+noMessagesTitle=Post omdirigering
+noMessagesMessage=Ingen meldinger ble valgt. Legg til én eller flere meldinger til meldingsområdet.
diff --git a/chrome/locale/nb/mailredirect-prefs.dtd b/chrome/locale/nb/mailredirect-prefs.dtd
new file mode 100644
index 0000000..cd9777e
--- /dev/null
+++ b/chrome/locale/nb/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "MailRedirect innstillinger">
+
+<!ENTITY copyToSentMails.label "Legg en kopi av omadressert post i sendt-mappen?">
+<!ENTITY copyToSentMails.accesskey "L">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Hvis dette alternativet er avmerket vil omadresserte meldinger plasseres i sendt-mappen. Hvis alternativet ikke er merket kopieers ikke omadressert melding til noen mappe. \nMerk: Hvis dette alternativet er valgt og innstillingene for kontoen som brukes for omadressering er 'ikke å lagre sendte meldinger' vil ikke kopi av omadressert melding lagres heller.">
+
+<!ENTITY addToForwardAs.label "Legg til omdirigering på menyer og knapper">
+<!ENTITY addToForwardAs.accesskey "A">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Ved å legge 'Videresend' til 'Send som'-menyer og knapper, grupperer du alle handlinger for videresending til et element.\nDu kan fjerne knappene fra verktøylinjene ved å tilpasse dem, og ved å merke valget nedenfor kan du skjule de enkelte menyelementene da de ikke har noen mening lenger.">
+
+<!ENTITY hideRedirectMenuitems.label "Skjul meny for videresending fra Melding, Program og kontekstmenyer">
+<!ENTITY hideRedirectMenuitems.accesskey "H">
+<!ENTITY hideRedirectMenuitems.tooltip "Skjul de enkelte elementene i meny for videresending fra Melding, Program og kontekstmenyer.">
+
+<!ENTITY concurrentConnections.label "Antall samtidige SMTP-tilkoblinger:">
+<!ENTITY concurrentConnections.accesskey "A">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Alternativet angir antall tilkoblinger som vil bli etablert på SMTP-serveren når du sender meldinger. Generelt, kan du øke ytelsen til sendeprosessen når du velger å omdirigere en stor mengde meldinger. \nMerk: Hvis du setter dette parameteret til null samtidige tilkoblinger ikke begrenses - vær klar over at dette kan innvirkninge på stabilitet av SMTP-serveren eller sending av noen meldinger kan mislykkes. Ved eventuelle problemer kan du angi denne verdien til en.">
+
+<!ENTITY defaultRecipientsGroup.label "Standard mottakere">
+
+<!ENTITY defaultResendTo.label "Send igjen til:">
+<!ENTITY defaultResendTo.accesskey "S">
+<!ENTITY defaultResendTo.tooltip "Kommaseparert liste over e-postadresser.">
+
+<!ENTITY defaultResendCc.label "Send igjen Cc:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Kommaseparert liste over e-postadresser.">
+
+<!ENTITY defaultResendBcc.label "Send blindkopi på nytt:">
+<!ENTITY defaultResendBcc.accesskey "b">
+<!ENTITY defaultResendBcc.tooltip "Kommaseparert liste over e-postadresser.">
+
+<!ENTITY defaultMode.label "Standardmodus:">
+<!ENTITY defaultMode.accesskey "m">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Velg hvordan du vil omdirigere meldinger som standard\nDenne innstillingen har bare effekt når du ikke har angitt noen standard mottakere.">
+<!ENTITY defaultModeResendTo.label "Send igjen til">
+<!ENTITY defaultModeResendCc.label "Send igjen Cc">
+<!ENTITY defaultModeResendBcc.label "Send blindkopi på nytt">
+
+<!ENTITY debug.label "Feilsøk">
+<!ENTITY debug.accesskey "F">
+<!ENTITY debug.tooltip "Slå på/av feilsøking for mailredirect-utvidelsen. Loggene sendes til JavaScript-konsoll.">
+
+<!ENTITY saveConsoleContent.label2 "Lagre Feilkonsollets innhold…">
+<!ENTITY saveConsoleContent.accesskey2 "e">
+<!ENTITY sendViaEmail.label "Sende via e-post">
+<!ENTITY sendViaEmail.accesskey "v">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Post omdirigering">
diff --git a/chrome/locale/nb/mailredirect-prefs.properties b/chrome/locale/nb/mailredirect-prefs.properties
new file mode 100644
index 0000000..e71a0fa
--- /dev/null
+++ b/chrome/locale/nb/mailredirect-prefs.properties
@@ -0,0 +1,4 @@
+tempFileErrorDlogTitle=Post omdirigering
+tempFileErrorDlogMessage=Feil ved skriving av midlertidig fil.
+
+saveFile2=Lagre Feilkonsollets innhold
diff --git a/chrome/locale/nb/mailredirect.dtd b/chrome/locale/nb/mailredirect.dtd
new file mode 100644
index 0000000..db2bb58
--- /dev/null
+++ b/chrome/locale/nb/mailredirect.dtd
@@ -0,0 +1,9 @@
+<!ENTITY bounceCommand.label "Omdiriger">
+<!ENTITY bounceCommand.accesskey "i">
+<!ENTITY bounceCommand.tooltip "Omdiriger valgte meldinger">
+<!ENTITY bounceMsgCmd.key "B">
+<!ENTITY bounceMsgCmd.modifiers "accel">
+
+<!ENTITY forwardAsRedirect.label "Omdiriger">
+<!ENTITY forwardAsRedirect.accesskey "O">
+<!ENTITY forwardAsRedirect.tooltip "Omdiriger valgt melding">
diff --git a/chrome/locale/nb/mailredirect.properties b/chrome/locale/nb/mailredirect.properties
new file mode 100644
index 0000000..37329f9
--- /dev/null
+++ b/chrome/locale/nb/mailredirect.properties
@@ -0,0 +1,4 @@
+# These strings are displayed in the Add-ons Manager.
+# If name string isn't localized, the name from en-US will be used. If you do translate this string, please append the original add-on name in parenthesis: (Mail Redirect).
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.name=Mail Redirect
+extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description=Kan omadressere (aka "remail") e-postmeldinger til andre mottakere.
diff --git a/chrome/locale/nb/msgHdrViewOverlay.dtd b/chrome/locale/nb/msgHdrViewOverlay.dtd
new file mode 100644
index 0000000..de90fc8
--- /dev/null
+++ b/chrome/locale/nb/msgHdrViewOverlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY hdrMailredirectButton1.label "Omdiriger">
+<!ENTITY hdrMailredirectButton1.tooltip "Omdiriger denne meldingen">
diff --git a/chrome/locale/nl/mailredirect-compose.dtd b/chrome/locale/nl/mailredirect-compose.dtd
new file mode 100644
index 0000000..a10263b
--- /dev/null
+++ b/chrome/locale/nl/mailredirect-compose.dtd
@@ -0,0 +1,69 @@
+<!ENTITY msgMailRedirectWindow.title "Bericht heradresseren">
+
+<!ENTITY fileMenu.label "Bestand">
+<!ENTITY fileMenu.accesskey "B">
+<!ENTITY forwardBounce.label "Heradresseren">
+<!ENTITY forwardBounce.accesskey "H">
+<!ENTITY closeCmd.label "Sluiten">
+<!ENTITY closeCmd.accesskey "S">
+
+<!ENTITY viewMenu.label "Beeld">
+<!ENTITY viewMenu.accesskey "l">
+<!ENTITY viewToolbarsMenuNew.label "Tonen/verbergen">
+<!ENTITY viewToolbarsMenuNew.accesskey "T">
+<!ENTITY menubarCmd.label "Menubalk">
+<!ENTITY menubarCmd.accesskey "M">
+
+<!ENTITY tasksMenu.label "Extra">
+<!ENTITY tasksMenu.accesskey "x">
+<!ENTITY messengerCmd.label "E-mail &amp; nieuwsgroepen">
+<!ENTITY messengerCmd.accesskey "m">
+<!ENTITY addressBookCmd.label "Adresboek">
+<!ENTITY addressBookCmd.accesskey "A">
+
+<!ENTITY bounceButton.label "Heradresseren">
+<!ENTITY bounceButton.tooltip "Berichten heradresseren">
+<!ENTITY addressButton.label "Adresboek">
+<!ENTITY addressButton.tooltip "Adresboek openen">
+<!ENTITY throbberItem.title "Activiteitsindicator">
+<!ENTITY throbber.tooltip "Naar de &vendorShortName;-startpagina">
+
+<!ENTITY closeCmd.key "W">
+<!ENTITY closeCmd.modifiers "accel">
+<!ENTITY messengerCmd.key "1">
+<!ENTITY messengerCmd.modifiers "accel">
+<!ENTITY addressBookCmd.key "B">
+<!ENTITY addressBookCmd.modifiers "accel, shift">
+
+<!ENTITY customizeToolbar.label "Aanpassen…">
+<!ENTITY customizeToolbar.accesskey "A">
+<!ENTITY showBounceToolbarCmd.label "Heradresseringswerkbalk">
+<!ENTITY showBounceToolbarCmd.accesskey "H">
+<!ENTITY showStatusbarCmd.label "Statusbalk">
+<!ENTITY showStatusbarCmd.accesskey "S">
+
+<!ENTITY addressSidebar.label "Adressenzijbalk">
+<!ENTITY addressSidebar.accesskey "A">
+<!ENTITY addressesSidebarTitle.label "Adresboek">
+<!ENTITY addressSidebarButton.label "Adresboek">
+<!ENTITY addressSidebarButton.tooltip "Een ontvanger uit een adresboek selecteren">
+
+<!ENTITY dialog.dimensions "width: 92ch; height: 36em;">
+
+<!-- LOCALIZATION NOTE headersSpace.style is for aligning the Resend-From:, Resend-To:,
+ Resend-Cc: and Resend-Bcc: rows. It should be larger than the largest Header
+ label -->
+<!ENTITY headersSpace.style "width: 12em;">
+
+<!ENTITY resendFromAddr.label "Heradresseer-Van:">
+<!ENTITY resendFromAddr.accesskey "H">
+
+<!ENTITY resendToAddr.label "Heradresseer-Aan:">
+<!ENTITY resendCcAddr.label "Heradresseer-Cc:">
+<!ENTITY resendBccAddr.label "Heradresseer-Bcc:">
+
+<!ENTITY bounceMailsLabel.label "De volgende berichten worden geheradresseerd:">
+
+<!ENTITY subject.label "Onderwerp">
+<!ENTITY sender.label "Afzender">
+<!ENTITY date.label "Datum">
diff --git a/chrome/locale/nl/mailredirect-compose.properties b/chrome/locale/nl/mailredirect-compose.properties
new file mode 100644
index 0000000..9de7813
--- /dev/null
+++ b/chrome/locale/nl/mailredirect-compose.properties
@@ -0,0 +1,54 @@
+mailredirectWindowTitlePrefix=Bericht heradresseren:
+
+# String used by the Initialization Error dialog
+initErrorDlogTitle=Bericht heradresseren
+initErrorDlogMessage=Er is een fout opgetreden bij het aanmaken van het Bericht heradesseren-venster. Probeer het nog een keer.
+
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+pluralRule=1
+
+resendToContextMenuLabelTB=Toevoegen aan Heradresseer-Aan-veld
+resendToContextMenuAccesskeyTB=A
+resendCcContextMenuLabelTB=Toevoegen aan Heradresseer-Cc-veld
+resendCcContextMenuAccesskeyTB=C
+resendBccContextMenuLabelTB=Toevoegen aan Heradresseer-Bcc-veld
+resendBccContextMenuAccesskeyTB=B
+resendToButtonLabel=Heradresseer-Aan:
+resendToButtonAccesskey=A
+resendCcButtonLabel=Heradresseer-Cc:
+resendCcButtonAccesskey=C
+resendBccButtonLabel=Heradresseer-Bcc:
+resendBccButtonAccesskey=B
+resendToContextMenuLabelSM=Heradresseer-Aan->
+resendToContextMenuAccesskeySM=A
+resendCcContextMenuLabelSM=Heradresseer-Cc->
+resendCcContextMenuAccesskeySM=C
+resendBccContextMenuLabelSM=Heradresseer-Bcc->
+resendBccContextMenuAccesskeySM=B
+
+# Strings used by prompt for Ctrl-Enter check before sending message
+# LOCALIZATION NOTE (sendMessageCheckWindowTitleMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckWindowTitleMsgs=Bericht verzenden;Berichten verzenden
+# LOCALIZATION NOTE (sendMessageCheckLabelMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageCheckLabelMsgs=Weet u zeker dat u dit bericht wilt verzenden?;Weet u zeker dat u deze berichten wilt verzenden?
+sendMessageCheckSendButtonLabel=Verzenden
+
+CheckMsg=Dit dialoogvenster niet meer tonen.
+
+# status feedback stuff
+# LOCALIZATION NOTE (sendMessageSuccessfulMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageSuccessfulMsgs=Bericht is met succes verzonden;Berichten zijn met succes verzonden
+# LOCALIZATION NOTE (sendMessageFailedMsgs): Semi-colon list of plural forms.
+# See: https://developer.mozilla.org/en/Localization_and_Plurals
+sendMessageFailedMsgs=Verzenden van bericht mislukt;Verzenden van berichten mislukt
+
+#
+noRecipientsTitle=Bericht heradresseren-fout
+noRecipientsMessage=Er zijn geen ontvangers opgegeven. Voer in het adresseringsgebied een ontvanger of nieuwsgroep in.
+
+#
+noMessagesTitle=Bericht heradresseren-fout
+noMessagesMessage=Er zijn geen berichten geselecteerd. Voeg een of meer berichten toe aan het berichtengebied.
diff --git a/chrome/locale/nl/mailredirect-prefs.dtd b/chrome/locale/nl/mailredirect-prefs.dtd
new file mode 100644
index 0000000..7089947
--- /dev/null
+++ b/chrome/locale/nl/mailredirect-prefs.dtd
@@ -0,0 +1,54 @@
+<!ENTITY mailredirectSettings.title "Mail Redirect-instellingen">
+
+<!ENTITY copyToSentMails.label "Kopie van geheradresseerde berichten in map Verzonden plaatsen?">
+<!ENTITY copyToSentMails.accesskey "K">
+<!-- LOCALIZATION NOTE (copyToSentMails.tooltip): do not translate \n -->
+<!ENTITY copyToSentMails.tooltip "Als deze optie is aangevinkt, wordt een kopie van geheradresseerde berichten in de map Verzonden geplaatst. Als deze optie niet is aangevinkt, wordt er geen kopie van geheradresseerde berichten bewaard.\nNB Als deze optie is aangevinkt en de account die voor heradressering wordt gebruikt op ‘geen kopie plaatsen’ is ingesteld, wordt er ook geen kopie van geheradresseerde berichten opgeslagen.">
+
+<!ENTITY addToForwardAs.label "‘Heradresseren’ toevoegen aan ‘Doorsturen als’ menu’s en knoppen">
+<!ENTITY addToForwardAs.accesskey "H">
+<!-- LOCALIZATION NOTE (addToForwardAs.tooltip): do not translate \n -->
+<!ENTITY addToForwardAs.tooltip "Door ‘Heradresseren’ aan de ‘Doorsturen als’ menu’s en knoppen toe te voegen, groepeert u alle doorstuuracties bij elkaar.\nU kunt de knoppen van de taakbalken verwijderen door de taakbalk aan te passen en door onderstaande optie aan te vinken, kunt u de losse menu-items verbergen, omdat deze redundant zijn geworden.">
+
+<!ENTITY hideRedirectMenuitems.label "Menu-item `Heradresseren’ verbergen in bericht-, applicatie- en context-menu’s">
+<!ENTITY hideRedirectMenuitems.accesskey "M">
+<!ENTITY hideRedirectMenuitems.tooltip "Verbergt het menu-item ‘Heradresseren’ in de bericht-, applicatie- en contextmenu’s.">
+
+<!ENTITY concurrentConnections.label "Aantal gelijktijdige SMTP-verbindingen:">
+<!ENTITY concurrentConnections.accesskey "S">
+<!-- LOCALIZATION NOTE (concurrentConnections.tooltip): do not translate \n -->
+<!ENTITY concurrentConnections.tooltip "Hiermee stelt u het aantal verbindingen in dat bij het verzenden van berichten met uw SMTP-server wordt opgezet. Doorgaans bereikt u hier betere prestaties mee als u veel berichten tegelijk heradresseert.\nNB Als u deze parameter op 0 instelt, geldt er geen limiet voor het aantal gelijktijdige verbindingen - dit kan de stabiliteit van uw SMTP-server beïnvloeden of het heradresseren van enkele berichten zou kunnen mislukken. Als u problemen ondervindt, stel dan de waarde in op 1.">
+
+<!ENTITY defaultRecipientsGroup.label "Standaardontvangers">
+
+<!ENTITY defaultResendTo.label "Heradresseer-Aan:">
+<!ENTITY defaultResendTo.accesskey "A">
+<!ENTITY defaultResendTo.tooltip "Kommagescheiden lijst van e-mailadressen.">
+
+<!ENTITY defaultResendCc.label "Heradresseer-Cc:">
+<!ENTITY defaultResendCc.accesskey "C">
+<!ENTITY defaultResendCc.tooltip "Kommagescheiden lijst van e-mailadressen.">
+
+<!ENTITY defaultResendBcc.label "Heradresseer-Bcc:">
+<!ENTITY defaultResendBcc.accesskey "B">
+<!ENTITY defaultResendBcc.tooltip "Kommagescheiden lijst van e-mailadressen.">
+
+<!ENTITY defaultMode.label "Standaardmodus:">
+<!ENTITY defaultMode.accesskey "t">
+<!-- LOCALIZATION NOTE (defaultMode.tooltip): do not translate \n -->
+<!ENTITY defaultMode.tooltip "Kiezen hoe u berichten standaard wilt heradresseren\nDeze instelling heeft alleen effect als u geen standaardontvangers hebt opgegeven.">
+<!ENTITY defaultModeResendTo.label "Heradresseer-Aan">
+<!ENTITY defaultModeResendCc.label "Heradresseer-Cc">
+<!ENTITY defaultModeResendBcc.label "Heradresseer-Bcc">
+
+<!ENTITY debug.label "Foutopsporing">
+<!ENTITY debug.accesskey "F">
+<!ENTITY debug.tooltip "Foutopsporing voor Mail Redirect-extensie aan-/uitzetten. Logboekvermeldingen worden naar de foutconsole gestuurd.">
+
+<!ENTITY saveConsoleContent.label2 "Inhoud van foutconsole opslaan…">
+<!ENTITY saveConsoleContent.accesskey2 "I">
+<!ENTITY sendViaEmail.label "Verzenden via e-mail">
+<!ENTITY sendViaEmail.accesskey "V">
+
+<!-- for seamonkey -->
+<!ENTITY mailredirectSettings.label "Bericht heradresseren">
diff --git a/chrome/locale/nl/mailredirect-prefs.properties b/chrome/locale/nl/mailredirect