Localize crop join banner across supported locales (#5257)

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Daniel O'Connorandgoogle-labs-jules[bot] authored and GitHub committed 2026-11-02 20:51:52 +10:30
1 parent 40349fa0f8
commit 508b2230ea
8 files changed
+43 -3

No files matched your search

+3 -3
View File
@@ -1,9 +1,9 @@
-# Shown to visitors who are not signed in: what Growstuff is, and an invitation to join.
.crop-join-banner.d-flex.flex-wrap.align-items-center.justify-content-between.gap-3
.crop-join-text
%strong Growstuff is a free, community-run site for people who grow food.
Keep track of what you plant and harvest, find seeds to swap, and see what is growing near you.
Join to record your own #{crop.name.pluralize}.
%strong= t('.heading')
= t('.text')
= t('.prompt', crops: crop.name.pluralize)
.crop-join-actions.text-nowrap
- sign_up = { data: { auth_dialog: 'sign_up' }, class: 'btn btn-signup' }
- sign_in = { data: { auth_dialog: 'sign_in' }, class: 'ms-2' }
+4
View File
@@ -229,6 +229,10 @@ de:
index:
subtitle: '%{crops_size} insgesamt'
title: Durchsuchen Sie Pflanzen
join_banner:
heading: Growstuff ist eine kostenlose, von der Community betriebene Website für Menschen, die Lebensmittel anbauen.
prompt: Melden Sie sich an, um Ihre eigenen %{crops} aufzuzeichnen.
text: Behalten Sie im Auge, was Sie pflanzen und ernten, finden Sie Saatgut zum Tauschen und sehen Sie, was in Ihrer Nähe wächst.
requested:
link: Sie haben %{number_crops} Kulturen, die auf die Genehmigung warten
subtitle: Genehmigung ausstehend
+4
View File
@@ -237,6 +237,10 @@ en:
index:
subtitle: "%{crops_size} total"
title: Browse Crops
join_banner:
heading: Growstuff is a free, community-run site for people who grow food.
prompt: Join to record your own %{crops}.
text: Keep track of what you plant and harvest, find seeds to swap, and see what is growing near you.
requested:
link: You have %{number_crops} crops awaiting approval
subtitle: Pending approval
+4
View File
@@ -229,6 +229,10 @@ es:
index:
subtitle: '%{crops_size} total'
title: Explorar cultivos
join_banner:
heading: Growstuff es un sitio gratuito administrado por la comunidad para personas que cultivan alimentos.
prompt: Únase para registrar sus propios %{crops}.
text: Lleve un registro de lo que siembra y cosecha, busque semillas para intercambiar y vea lo que crece cerca de usted.
requested:
link: Tienes cultivos %{number_crops} pendientes de aprobación
subtitle: Pendiente de aprobación
+4
View File
@@ -229,6 +229,10 @@ fr:
index:
subtitle: '%{crops_size} total'
title: Parcourir les cultures
join_banner:
heading: Growstuff est un site gratuit géré par la communauté pour les personnes qui cultivent des aliments.
prompt: Inscrivez-vous pour enregistrer vos propres %{crops}.
text: Gardez une trace de ce que vous plantez et récoltez, trouvez des graines à échanger et découvrez ce qui pousse près de chez vous.
requested:
link: Vous avez des cultures %{number_crops} en attente d'approbation
subtitle: En attente d’approbation
+4
View File
@@ -19,6 +19,10 @@ ja:
name: 学名
save: 保存
wikidata_id: Wikidata ID
join_banner:
heading: Growstuffは作物を育てる人々のための無料のコミュニティ運営サイトです。
prompt: 参加してあなた自身の%{crops}を記録しましょう。
text: 植えたものや収穫したものを記録し、交換する種を見つけ、近くで何が育っているかを確認しましょう。
harvests:
edit_modal:
harvested_at: いつ収穫しましたか?
+4
View File
@@ -229,6 +229,10 @@ zh:
index:
subtitle: '%{crops_size} 总计'
title: 浏览农作物
join_banner:
heading: Growstuff 是一个免费的、由社区运营的网站,面向种植食物的人们。
prompt: 注册即可记录您自己的 %{crops}。
text: 记录您种植和收获的内容,寻找种子进行交换,并了解您附近种植的植物。
requested:
link: 您有 %{number_crops} 作物等待批准
subtitle: 待批准
@@ -22,6 +22,10 @@ describe CropsController do
expect(page).to have_css('.crop-join-banner a', text: 'Sign in')
end
it 'prompts to record the crop' do
expect(page).to have_css('.crop-join-banner', text: 'Join to record your own tomatoes.')
end
it 'comes after the description' do
expect(response.body.index('A red berry.')).to be < response.body.index('crop-join-banner')
end
@@ -31,6 +35,18 @@ describe CropsController do
end
end
context 'when requesting with another locale' do
before { get crop_path(crop, locale: :es) }
it 'renders the localised banner heading' do
expect(page).to have_css('.crop-join-banner', text: 'Growstuff es un sitio gratuito administrado por la comunidad')
end
it 'renders the localised prompt' do
expect(page).to have_css('.crop-join-banner', text: 'Únase para registrar sus propios tomatoes.')
end
end
context 'when signed in' do
before do
sign_in create(:member)