Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/cameras/socs/hi3536dv100_is_weird.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<%= image_tag 'icons/pose/warning_front.png' %>
</div>
<div class="col col-lg-7 col-xl-6 col-xxl-5">
<h2 class="mt-5 mb-3">Attention!</h2>
<h2 class="mt-5 mb-3"><%= t('firmware.installation.attention') %></h2>
<p class="lead"><%= t('.paragraph1') %></p>
<p><%= t('.paragraph2') %> <a href="https://github.com/OpenIPC/wiki/blob/master/en/fpv-nvr.md"
target="_blank">https://github.com/OpenIPC/wiki/blob/master/en/fpv-nvr.md</a></p>
Expand Down
4 changes: 2 additions & 2 deletions app/views/cameras/socs/sigmastar_nand_is_weird.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<%= image_tag 'icons/pose/warning_front.png' %>
</div>
<div class="col col-lg-7 col-xl-6 col-xxl-5">
<h2 class="mt-5 mb-3">Attention!</h2>
<p class="lead"><%= t('.paragraph1') %>></p>
<h2 class="mt-5 mb-3"><%= t('firmware.installation.attention') %></h2>
<p class="lead"><%= t('.paragraph1') %></p>
<p><%= t('.paragraph2') %> <a href="https://github.com/OpenIPC/wiki/blob/master/en/fpv-sigmastar.md"
target="_blank">https://github.com/OpenIPC/wiki/blob/master/en/fpv-sigmastar.md</a></p>
</div>
Expand Down
1 change: 1 addition & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ de:
firmware:
info_html: Wenn Sie mehr darüber erfahren möchten, was die Befehle %{commands} bewirken, führen Sie <code>printenv</code> in der Bootloader-Konsole aus.
installation:
attention: Achtung!
backup:
info: OpenIPC U-Boot überschreibt die ursprüngliche Kryptopartition und macht es unmöglich, zur werkseitigen Firmware zurückzukehren, es sei denn, Sie haben ein vollständiges Flash-Backup für diese bestimmte Kamera! Um ein vollständiges Firmware-Backup zu erstellen, starten Sie einen TFTP-Server und führen Sie diese Befehle in der Bootloader-Shell aus.
more_info_html: Weitere Informationen finden Sie in den <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">Installationsanweisungen</a> im Wiki des Projekts.
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ en:
firmware:
info_html: If you want to learn more about what the %{commands} commands do, run <code>printenv</code> in the bootloader console.
installation:
attention: Attention!
backup:
info: OpenIPC U-Boot overwrites the original crypto partition making it impossible to revert to the factory firmware unless you have a full flash backup for this particular camera! To create a full firmware backup start a TFTP server and run these commands in bootloader shell.
more_info_html: Please refer to <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">Installation instructions</a> in the project's wiki for more information.
Expand Down
1 change: 1 addition & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ es:
firmware:
info_html: Si desea obtener más información sobre lo que hacen los comandos %{commands}, ejecute <code>printenv</code> en la consola del gestor de arranque.
installation:
attention: ¡Atención!
backup:
info: OpenIPC U-Boot sobrescribe la partición criptográfica original, lo que hace imposible volver al firmware de fábrica a menos que tenga una copia de seguridad flash completa para esta cámara en particular. Para crear una copia de seguridad completa del firmware, inicie un servidor TFTP y ejecute estos comandos en el shell del gestor de arranque.
more_info_html: Consulte <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">las instrucciones de instalación</a> en la wiki del proyecto para obtener más información.
Expand Down
1 change: 1 addition & 0 deletions config/locales/fa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fa:
firmware:
info_html: اگر می‌خواهید درباره کارهایی که دستورات %{commands} انجام می‌دهند بیشتر بدانید، <code>printenv</code> را در کنسول بوت‌لودر اجرا کنید.
installation:
attention: توجه!
backup:
info: OpenIPC U-Boot پارتیشن کریپتو اصلی را بازنویسی می کند و بازگشت به سیستم عامل کارخانه را غیرممکن می کند مگر اینکه یک نسخه پشتیبان کامل از فلش برای این دوربین خاص داشته باشید! برای ایجاد یک نسخه پشتیبان کامل از سیستم عامل، یک سرور TFTP را راه اندازی کنید و این دستورات را در پوسته بوت لودر اجرا کنید.
more_info_html: لطفاً برای اطلاعات بیشتر به <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">دستورالعمل‌های نصب</a> در ویکی پروژه مراجعه کنید.
Expand Down
1 change: 1 addition & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fr:
firmware:
info_html: Si vous souhaitez en savoir plus sur ce que font les commandes %{commands}, exécutez <code>printenv</code> dans la console du chargeur de démarrage.
installation:
attention: Attention !
backup:
info: OpenIPC U-Boot écrase la partition cryptographique d'origine, ce qui rend impossible le retour au micrologiciel d'usine à moins que vous ne disposiez d'une sauvegarde flash complète pour cet appareil photo particulier ! Pour créer une sauvegarde complète du micrologiciel, démarrez un serveur TFTP et exécutez ces commandes dans le shell du chargeur de démarrage.
more_info_html: Veuillez vous référer aux <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">instructions d'installation</a> dans le wiki du projet pour plus d'informations.
Expand Down
1 change: 1 addition & 0 deletions config/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ it:
firmware:
info_html: Se vuoi saperne di più su cosa fanno i comandi %{commands}, esegui <code>printenv</code> nella console del bootloader.
installation:
attention: Attenzione!
backup:
info: OpenIPC U-Boot sovrascrive la partizione crittografica originale rendendo impossibile ripristinare il firmware di fabbrica a meno che non si disponga di un backup flash completo per questa particolare fotocamera! Per creare un backup completo del firmware, avvia un server TFTP ed esegui questi comandi nella shell del bootloader.
more_info_html: Per ulteriori informazioni, fare riferimento alle <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">istruzioni di installazione</a> nella wiki del progetto.
Expand Down
1 change: 1 addition & 0 deletions config/locales/pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pl:
firmware:
info_html: Jeśli chcesz dowiedzieć się więcej o działaniu poleceń %{commands}, uruchom <code>printenv</code> w konsoli bootloadera.
installation:
attention: Uwaga!
backup:
info: OpenIPC U-Boot zastępuje oryginalną partycję kryptograficzną, uniemożliwiając powrót do fabrycznego oprogramowania, chyba że masz pełną kopię zapasową flash dla tej konkretnej kamery! Aby utworzyć pełną kopię zapasową oprogramowania sprzętowego, uruchom serwer TFTP i uruchom te polecenia w powłoce programu ładującego.
more_info_html: Aby uzyskać więcej informacji, zapoznaj się z <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">instrukcjami instalacji</a> na wiki projektu.
Expand Down
1 change: 1 addition & 0 deletions config/locales/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pt:
firmware:
info_html: Se você quiser saber mais sobre o que os comandos %{commands} fazem, execute <code>printenv</code> no console do bootloader.
installation:
attention: Atenção!
backup:
info: O OpenIPC U-Boot substitui a partição criptografada original, tornando impossível reverter para o firmware de fábrica, a menos que você tenha um backup flash completo para esta câmera em particular! Para criar um backup completo do firmware, inicie um servidor TFTP e execute estes comandos no shell do bootloader.
more_info_html: Consulte as <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">instruções de instalação</a> no wiki do projeto para obter mais informações.
Expand Down
1 change: 1 addition & 0 deletions config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ru:
firmware:
info_html: Если вы хотите узнать больше о том, что делают команды %{commands}, запустите <code>printenv</code> в консоли загрузчика.
installation:
attention: Внимание!
backup:
info: OpenIPC U-Boot перезаписывает исходный криптографический раздел, делая невозможным возврат к заводской прошивке, если у вас нет полной резервной копии флэш-памяти для этой конкретной камеры! Чтобы создать полную резервную копию прошивки, запустите TFTP-сервер и выполните эти команды в оболочке загрузчика.
more_info_html: Пожалуйста, обратитесь к <a href="https://github.com/openipc/wiki/blob/master/en/installation.md">инструкциям по установке</a> в вики проекта для получения дополнительной информации.
Expand Down
1 change: 1 addition & 0 deletions config/locales/zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ zh:
firmware:
info_html: 如果您想详细了解 %{commands} 命令的作用,请在引导加载程序控制台中执行<code>printenv</code> 。
installation:
attention: 注意!
backup:
info: OpenIPC U-Boot 会覆盖原始的加密分区,因此无法恢复为出厂固件,除非您拥有此特定摄像机的完整闪存备份!要创建完整的固件备份,请启动 TFTP 服务器并在引导加载程序 shell 中执行这些命令。
more_info_html: 有关详细信息,请参阅项目 wiki 中的<a href="https://github.com/openipc/wiki/blob/master/en/installation.md">安装说明</a>。
Expand Down
48 changes: 48 additions & 0 deletions test/controllers/socs_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,54 @@ def assert_told_to_remap_partitions(vendor_name)
assert_told_to_remap_partitions('Ingenic')
end

# --- the pages that send the visitor to the wiki instead ---

# These two render their own template and no commands at all. The heading was
# a hardcoded English "Attention!" on both, and the SigmaStar one carried a
# stray `>` after the ERB tag that reached the page as literal text --
# "...not included in this guide.>". Both are visible on openipc.org today.
# Asserted in Russian on purpose. The English translation of this heading is
# the word that was hardcoded, so an English assertion passes either way and
# proves nothing.
def assert_heading_is_translated
assert_match %(<h2 class="mt-5 mb-3">Внимание!</h2>), response.body
end

# I18n.with_locale rather than ?locale=ru, because the param does nothing:
# Multilang's `before_action :set_locale` is commented out (multilang.rb:21),
# so nothing reads it and every request renders in English. That is worth
# knowing separately; here it just means the switch has to be made directly.
def submit_in_russian(soc, flash_type, firmware_version)
I18n.with_locale(:ru) { submit(soc, flash_type, firmware_version:) }
end

test 'the SigmaStar NAND page translates its heading and has no stray markup' do
vendor = Vendor.create!(name: 'SigmaStar')
soc = Soc.create!(vendor:, model: 'TS338Q', status: 'done', load_address: '0x22000000',
uboot_filename: 'u-boot-ts338q-universal.bin',
linux_filename: 'openipc.ts338q-nor-lite.tgz')

with_release_index("openipc.#{soc.board}-nand-ultimate.tgz") do
submit(soc, 'nand', firmware_version: 'ultimate')

assert_match 'not included in this guide.</p>', response.body
assert_no_match(/guide\.(&gt;|>)/, response.body)

submit_in_russian(soc, 'nand', 'ultimate')
assert_heading_is_translated
end
end

test 'the HI3536 NVR page translates its heading too' do
soc = instructable_soc('HI3536DV100')

with_release_index(*every_edition_for(soc)) do
submit_in_russian(soc, 'nor8m', 'lite')

assert_heading_is_translated
end
end

# --- the permanent link ---

def permalink_for(**attrs)
Expand Down
Loading