זוהי כנראה שאלה טיפשה, אבל הא OCD הקטן שלי מתעורר.
יצרתי תוסף אך רק המילה הראשונה בשם היא עם אות גדולה.
בדקתי כמה קבצי plugin.rb אחרים ולא ראיתי שם מילים עם אותיות רישיות וגם ל- /config/settings.yml אין אותיות רישיות.
האם יש קובץ אחר שאני צריך ליצור כדי להשיג את מה שאני רוצה?
אתה כנראה יכול לעשות זאת עם CSS.
אתה יכול למקד את אלמנט שם ההתקן ולהשתמש ב-text-transform: capitalize. זה יגרום למלים להיות באותיות גדולות.
rame על נייד עכשיו ולכן לא יכול לבדוק את האלמנט
זה היה מתקן את זה באתר שלי, אבל אם תתקין את התוסף שלי, זה עדיין יהיה שבור באתר שלך.
אני מחפש פתרון להתאים את התוסף עצמו, אני לא חושב שתוספים אחרים משתמשים ב-CSS כדי להשיג את זה.
הממ… יש לי מושג למה זה קורה, אבל כדי להיות בטוח, אפשר לדעת איזה תוסף יש לו את הבעיה הזאת?
בנית תוסף מותאם אישית. אני רוצה לשתף אותו עם הקהילה בסופו של דבר, אבל הייתי רוצה לתקן לפחות את הדבר הזה שגורם לי להיראות כמו פורסט ויטקר עיניים לפני שאעשה זאת.
האם אפשר לשלוח את קובץ ה-yml שלך להגדרות, או את קובץ האזור?
תודה.
אני פשוט שלחתי את זה בהודעה פרטית.
Well, if I install your plugin and every word is captilized, from my, and majority of the world, point of view your plugin is broken that way.
You can’t win. You have to choose if you want to do how you want or how most of the globe works ![]()
Not a major question, though.
This is a hint ![]()
Discourse plugin names and settings are lowercase as a convention.
I wasn’t sure what the current convention was for the name displayed on the /plugins page. There seems to be a mix of sentence and title case for different ones (eg Data explorer v Documentation Categories)
If this is about the display name, this is how it works.
If your plugin has metadata # name: discourse-foo-bar in plugin.rb,
Then the plugin will be shown as “Foo bar”
But you can override this in locales/client.XX.yml
en:
admin_js:
admin:
site_settings:
categories:
discourse_foo_bar: "Discourse Foo Bar Blah"
The plugins will be sorted by what comes after discourse- though.
What about the
?
-
admin_js.admin.site_settings.categories.discourse_foo_plugin
–שם ברשימת/admin/plugins -
js.discourse_foo_plugin.title
–כותרת במסך הניהול של התוסף (/admin/plugins/discourse-foo-plugin) -
js.discourse_foo_plugin.admin_navigation
–שֵׁם בתפריט הצד של הניהול
הבנתי, תודה שהבהרת!
Yes, display name.
I have this in a config/locales/client.en.yml file, I rebuilt, and there was no change.
en:
admin_js:
admin:
site_settings:
categories:
auto_remove_group: "Auto Remove User from Group"
site_settings:
auto_remove_group_enabled: Enable the Auto Remove User from Group plugin.
auto_remove_group_category_id: Set the category ID number you are watching for posts. It can be found in the URL when you navigate to a category.
auto_remove_group_name: Set the group you want the user to be removed from once they post in category selected above.
Actually, the general consensus is that each word in a title is capitalized.
ועדיין זה לא כך. זו דרך אמריקאית, מגיע מהחדשות.
טוב, מתוך 10 התוספים שהתקנתי שבנטועים יותר ממש слово אחד, 7 מהם בהכתב באות גדולה.
and הרבה יותר בחלק התוספים של אתר זה מקפידים על ההנחיה הזו. וזה מה שאני רוצה שגם התוספים שלי ייראו כך.
המפתח שלך הוא auto_remove_group אך ה-#name שלך ב-plugin.rb הוא discourse-auto-remove-group.
נסה להוסיף את הקידומת discourse_ למפתח

