File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,19 @@ def show
2525 @doc . content . gsub! "{{ NUM_OF_TOTAL_EVENTS }}" , Dojo ::NUM_OF_TOTAL_EVENTS
2626 @doc . content . gsub! "{{ NUM_OF_TOTAL_NINJAS }}" , Dojo ::NUM_OF_TOTAL_NINJAS
2727 end
28+
29+ # INACTIVE_THRESHOLD を日本語の期間表記に変換
30+ if @doc . content . include? "INACTIVE_THRESHOLD"
31+ # 1.year → "1年間", 6.months → "6ヶ月間" のように変換
32+ threshold_in_months = Dojo ::INACTIVE_THRESHOLD . to_i / 1 . month . to_i
33+ threshold_text = if threshold_in_months >= 12
34+ years = threshold_in_months / 12
35+ "#{ years . to_s . tr ( '0-9' , '0-9' ) } 年間"
36+ else
37+ "#{ threshold_in_months . to_s . tr ( '0-9' , '0-9' ) } ヶ月間"
38+ end
39+ @doc . content . gsub! "{{ INACTIVE_THRESHOLD }}" , threshold_text
40+ end
2841
2942 @content = Kramdown ::Document . new ( @doc . content , input : 'GFM' ) . to_html
3043 @url = request . url
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ CoderDojo の立ち上げ申請がまだお済みでない場合は、下記ペ
41411 . 文字数やタグ数に上限があるため、申請内容を一部変更して掲載する場合があります 🙏
4242 - 📝 例: scratch→Scratch,月1回開催→毎月開催,HTML5→HTML,マイクラ→Minecraft など
4343 - <br >
44- 1 . 財団により非アクティブと判断された場合、もしくは一定期間 (現時点では1年間 ) 活動状況が確認できない場合は非表示になります 😴
44+ 1 . 財団により非アクティブと判断された場合、もしくは一定期間 (現時点では{{ INACTIVE_THRESHOLD }} ) 活動状況が確認できない場合は非表示になります 😴
4545 - 📜️ [ CoderDojo が承認されているかを確認する方法 - CoderDojo Japan] ( /docs/how-to-check-dojo-status )
4646 - <br >
47471 . 申請後もロゴ画像や説明文を更新できますので、まずは気軽にお申し込みください 📮✨
You can’t perform that action at this time.
0 commit comments