Skip to content

Commit

Permalink
Added turkish tranlation file
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammedsaidckr committed Dec 11, 2023
1 parent c445b23 commit 6dc7842
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
24 changes: 12 additions & 12 deletions js/src/forum/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import app from 'flarum/forum/app';
import {extend} from "flarum/common/extend";
import PostUser from "flarum/forum/components/PostUser";

app.initializers.add('muhammedsaidckr/flarum-chatgpt', () => {
// extend(PostUser.prototype, 'view', function (view) {
// const user = this.attrs.post.user();
//
// if (!user || app.forum.attribute('chatGptUserPromptId') !== user.id()) return;
//
// view.children.push(
// <div className="UserPromo-badge">
// <div className="badge">{app.forum.attribute('chatGptBadgeText')}</div>
// </div>
// );
// })
app.initializers.add('muhammedsaidckr-flarum-chatgpt', () => {
extend(PostUser.prototype, 'view', function (view) {
const user = this.attrs.post.user();

if (!user || app.forum.attribute('chatGptUserPromptId') !== user.id()) return;

view.children.push(
<div className="UserPromo-badge">
<div className="badge">{app.forum.attribute('chatGptBadgeText')}</div>
</div>
);
})
});
24 changes: 24 additions & 0 deletions locale/tr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
muhammedsaidckr-chatgpt:
# For more details on the format
# Checkout https://docs.flarum.org/extend/i18n/#appendix-a-standard-key-format
admin:
settings:
api_key_label: API Key
api_key_help: Open API key üretmek için <a>openai.com</a>.
model_label: Model
model_help: "Daha fazla bilgi almak için <a>modeller</a> (varsayılan: <code>gpt-3.5-turbo-instruct</code>)."
max_tokens_label: En fazla kullanılabilecek jeton sayısı
max_tokens_help: <a>Jeton nedir ve nasıl sayılır?</a>
user_prompt_label: Kullanıcı istemi
user_prompt_help: Yanıtı oluşturmak için kullanılacak kullanıcı kimliğini girin. Varsayılan, tartışmayı kimin başlattığıdır.
user_prompt_badge_label: Kullanıcı İstemi Rozeti
user_prompt_badge_help: Kullanıcı isteminin yanında görüntülenecek metin.
enable_on_discussion_started_label: Tartışma başlatıldığında etkinleştir
enable_on_discussion_started_help: The discussion will receive an answer based on content of first post when the discussion is started.
enabled_tags_label: Enabled Tags
enabled_tags_help: Select which tags will be used to generate the answer.

permissions:
use_chatgpt_assistant_label: Use ChatGPT Assistant

forum:

0 comments on commit 6dc7842

Please sign in to comment.