Seed categories with capitalized names
This commit is contained in:
parent
d277932b22
commit
c6a313d458
|
@ -225,13 +225,13 @@ en:
|
||||||
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences/about-me'>would you like to fill it out?</a></div>"
|
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences/about-me'>would you like to fill it out?</a></div>"
|
||||||
no_info_other: "<div class='missing-profile'>%{name} hasn't entered anything in the About Me field of their profile yet</div>"
|
no_info_other: "<div class='missing-profile'>%{name} hasn't entered anything in the About Me field of their profile yet</div>"
|
||||||
|
|
||||||
vip_category_name: "lounge"
|
vip_category_name: "Lounge"
|
||||||
vip_category_description: "A category exclusive to members with trust level 3 and higher."
|
vip_category_description: "A category exclusive to members with trust level 3 and higher."
|
||||||
|
|
||||||
meta_category_name: "meta"
|
meta_category_name: "Meta"
|
||||||
meta_category_description: "Discussion about this forum, its organization, how it works, and how we can improve it."
|
meta_category_description: "Discussion about this forum, its organization, how it works, and how we can improve it."
|
||||||
|
|
||||||
staff_category_name: "staff"
|
staff_category_name: "Staff"
|
||||||
staff_category_description: "Private category for staff discussions. Topics are only visible to admins and moderators."
|
staff_category_description: "Private category for staff discussions. Topics are only visible to admins and moderators."
|
||||||
|
|
||||||
assets_topic_body: "This is a permanent topic, visible only to staff, for storing images and files used in the forum design. Don't delete it!\n\n\nHere's how:\n\n\n1. Reply to this topic.\n2. Upload all the images you wish to use for logos, favicons, and so forth here. (Use the upload toolbar icon in the post editor, or drag-and-drop or paste images.)\n3. Submit your reply to post it.\n4. Right click the images in your new post to get the path to the uploaded images, or click the edit icon to edit your post and retrieve the path to the images. Copy the image paths.\n5. Paste those image paths into [basic settings](/admin/site_settings/category/required).\n\n\nAlso, if you need to enable different file type uploads, edit `authorized_extensions` in the [file settings](/admin/site_settings/category/files)."
|
assets_topic_body: "This is a permanent topic, visible only to staff, for storing images and files used in the forum design. Don't delete it!\n\n\nHere's how:\n\n\n1. Reply to this topic.\n2. Upload all the images you wish to use for logos, favicons, and so forth here. (Use the upload toolbar icon in the post editor, or drag-and-drop or paste images.)\n3. Submit your reply to post it.\n4. Right click the images in your new post to get the path to the uploaded images, or click the edit icon to edit your post and retrieve the path to the images. Copy the image paths.\n5. Paste those image paths into [basic settings](/admin/site_settings/category/required).\n\n\nAlso, if you need to enable different file type uploads, edit `authorized_extensions` in the [file settings](/admin/site_settings/category/files)."
|
||||||
|
|
|
@ -5,8 +5,8 @@ SiteSetting.refresh!
|
||||||
if SiteSetting.uncategorized_category_id == -1 || !Category.exists?(SiteSetting.uncategorized_category_id)
|
if SiteSetting.uncategorized_category_id == -1 || !Category.exists?(SiteSetting.uncategorized_category_id)
|
||||||
puts "Seeding uncategorized category!"
|
puts "Seeding uncategorized category!"
|
||||||
|
|
||||||
result = Category.exec_sql "SELECT 1 FROM categories WHERE name = 'uncategorized'"
|
result = Category.exec_sql "SELECT 1 FROM categories WHERE lower(name) = 'uncategorized'"
|
||||||
name = 'uncategorized'
|
name = 'Uncategorized'
|
||||||
if result.count > 0
|
if result.count > 0
|
||||||
name << SecureRandom.hex
|
name << SecureRandom.hex
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
class AddUncategorizedCategory < ActiveRecord::Migration
|
class AddUncategorizedCategory < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
|
|
||||||
result = execute "SELECT 1 FROM categories WHERE name = 'uncategorized'"
|
result = execute "SELECT 1 FROM categories WHERE lower(name) = 'uncategorized'"
|
||||||
name = 'uncategorized'
|
name = 'Uncategorized'
|
||||||
if result.count > 0
|
if result.count > 0
|
||||||
name << SecureRandom.hex
|
name << SecureRandom.hex
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue