rubocop and improved lang support
This commit is contained in:
parent
29f0b78667
commit
4c33688b19
7 changed files with 492 additions and 452 deletions
2
.rubocop.yml
Normal file
2
.rubocop.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
AllCops:
|
||||||
|
TargetRubyVersion: 3.4
|
||||||
7
Gemfile
7
Gemfile
|
|
@ -1,8 +1,9 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
# gem "rails"
|
# gem "rails"
|
||||||
|
|
||||||
gem "sinatra", "~> 4.1"
|
gem 'rack-accept', '~> 0.4.5'
|
||||||
gem "rack-accept", "~> 0.4.5"
|
gem 'rubocop', require: false
|
||||||
|
gem 'sinatra', '~> 4.1'
|
||||||
|
|
|
||||||
31
Gemfile.lock
31
Gemfile.lock
|
|
@ -1,10 +1,20 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
ast (2.4.3)
|
||||||
base64 (0.2.0)
|
base64 (0.2.0)
|
||||||
|
json (2.12.2)
|
||||||
|
language_server-protocol (3.17.0.5)
|
||||||
|
lint_roller (1.1.0)
|
||||||
logger (1.7.0)
|
logger (1.7.0)
|
||||||
mustermann (3.0.3)
|
mustermann (3.0.3)
|
||||||
ruby2_keywords (~> 0.0.1)
|
ruby2_keywords (~> 0.0.1)
|
||||||
|
parallel (1.27.0)
|
||||||
|
parser (3.3.8.0)
|
||||||
|
ast (~> 2.4.1)
|
||||||
|
racc
|
||||||
|
prism (1.4.0)
|
||||||
|
racc (1.8.1)
|
||||||
rack (3.1.14)
|
rack (3.1.14)
|
||||||
rack-accept (0.4.5)
|
rack-accept (0.4.5)
|
||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
|
|
@ -15,6 +25,23 @@ GEM
|
||||||
rack-session (2.1.1)
|
rack-session (2.1.1)
|
||||||
base64 (>= 0.1.0)
|
base64 (>= 0.1.0)
|
||||||
rack (>= 3.0.0)
|
rack (>= 3.0.0)
|
||||||
|
rainbow (3.1.1)
|
||||||
|
regexp_parser (2.10.0)
|
||||||
|
rubocop (1.75.7)
|
||||||
|
json (~> 2.3)
|
||||||
|
language_server-protocol (~> 3.17.0.2)
|
||||||
|
lint_roller (~> 1.1.0)
|
||||||
|
parallel (~> 1.10)
|
||||||
|
parser (>= 3.3.0.2)
|
||||||
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
|
regexp_parser (>= 2.9.3, < 3.0)
|
||||||
|
rubocop-ast (>= 1.44.0, < 2.0)
|
||||||
|
ruby-progressbar (~> 1.7)
|
||||||
|
unicode-display_width (>= 2.4.0, < 4.0)
|
||||||
|
rubocop-ast (1.44.1)
|
||||||
|
parser (>= 3.3.7.2)
|
||||||
|
prism (~> 1.4)
|
||||||
|
ruby-progressbar (1.13.0)
|
||||||
ruby2_keywords (0.0.5)
|
ruby2_keywords (0.0.5)
|
||||||
sinatra (4.1.1)
|
sinatra (4.1.1)
|
||||||
logger (>= 1.6.0)
|
logger (>= 1.6.0)
|
||||||
|
|
@ -24,6 +51,9 @@ GEM
|
||||||
rack-session (>= 2.0.0, < 3)
|
rack-session (>= 2.0.0, < 3)
|
||||||
tilt (~> 2.0)
|
tilt (~> 2.0)
|
||||||
tilt (2.6.0)
|
tilt (2.6.0)
|
||||||
|
unicode-display_width (3.1.4)
|
||||||
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
||||||
|
unicode-emoji (4.0.4)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
@ -31,6 +61,7 @@ PLATFORMS
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
rack-accept (~> 0.4.5)
|
rack-accept (~> 0.4.5)
|
||||||
|
rubocop
|
||||||
sinatra (~> 4.1)
|
sinatra (~> 4.1)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
|
|
|
||||||
77
app.rb
77
app.rb
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'sinatra'
|
require 'sinatra'
|
||||||
require 'json'
|
require 'json'
|
||||||
|
|
@ -7,43 +8,43 @@ require 'time'
|
||||||
use Rack::Accept
|
use Rack::Accept
|
||||||
|
|
||||||
NO_RESPONSES = {
|
NO_RESPONSES = {
|
||||||
"en" => [
|
'en' => [
|
||||||
"No.", "Nope.", "Nah.", "Nuh-uh.", "Negative.", "Nay.",
|
'No.', 'Nope.', 'Nah.', 'Nuh-uh.', 'Negative.', 'Nay.',
|
||||||
"Hell no.", "Not in a million years.", "Get lost.",
|
'Hell no.', 'Not in a million years.', 'Get lost.',
|
||||||
"Not happening, buddy.", "Why don't you try asking someone else?",
|
'Not happening, buddy.', "Why don't you try asking someone else?",
|
||||||
"Are you kidding me?", "Absolutely not, go away.",
|
'Are you kidding me?', 'Absolutely not, go away.',
|
||||||
"I’m terribly sorry, but no.", "I regret to inform you that I cannot comply.",
|
'I’m terribly sorry, but no.', 'I regret to inform you that I cannot comply.',
|
||||||
"Unfortunately, that will not be possible at this time.",
|
'Unfortunately, that will not be possible at this time.',
|
||||||
"I must respectfully decline your request.", "I wish I could, but sadly I cannot.",
|
'I must respectfully decline your request.', 'I wish I could, but sadly I cannot.',
|
||||||
"It would be my pleasure to help, but I must regretfully decline.",
|
'It would be my pleasure to help, but I must regretfully decline.',
|
||||||
"With the greatest respect, I must say no.",
|
'With the greatest respect, I must say no.',
|
||||||
"I apologize, but I must kindly refuse your request."
|
'I apologize, but I must kindly refuse your request.'
|
||||||
],
|
],
|
||||||
"de" => ["Nein.", "Keineswegs."],
|
'de' => ['Nein.', 'Keineswegs.'],
|
||||||
"fr" => ["Non.", "Jamais."],
|
'fr' => ['Non.', 'Jamais.'],
|
||||||
"ja" => ["いいえ", "ダメです。"],
|
'ja' => ['いいえ', 'ダメです。'],
|
||||||
"ru" => ["Нет", "Никак нет"],
|
'ru' => ['Нет', 'Никак нет'],
|
||||||
"pt" => ["Não.", "De jeito nenhum."],
|
'pt' => ['Não.', 'De jeito nenhum.'],
|
||||||
"es" => ["No.", "Para nada."],
|
'es' => ['No.', 'Para nada.'],
|
||||||
"pl" => ["Nie.", "W żadnym wypadku."],
|
'pl' => ['Nie.', 'W żadnym wypadku.'],
|
||||||
"fi" => ["Ei.", "Ei todellakaan."],
|
'fi' => ['Ei.', 'Ei todellakaan.'],
|
||||||
"tr" => ["Hayır.", "Bu değil."],
|
'tr' => ['Hayır.', 'Bu değil.'],
|
||||||
"he" => ["לא"],
|
'he' => ['לא'],
|
||||||
"hi" => ["नहीं", "बिलकुल नहीं"],
|
'hi' => ['नहीं', 'बिलकुल नहीं'],
|
||||||
"no" => ["Nei.", "Absolutt ikke.", "Ikke tale om."],
|
'no' => ['Nei.', 'Absolutt ikke.', 'Ikke tale om.'],
|
||||||
"sv" => ["Nej.", "Inte alls."],
|
'sv' => ['Nej.', 'Inte alls.'],
|
||||||
"da" => ["Nej.", "Ikke en chance."],
|
'da' => ['Nej.', 'Ikke en chance.'],
|
||||||
"it" => ["No.", "Assolutamente no."],
|
'it' => ['No.', 'Assolutamente no.'],
|
||||||
"nl" => ["Nee.", "Absoluut niet."],
|
'nl' => ['Nee.', 'Absoluut niet.'],
|
||||||
"cs" => ["Ne.", "Rozhodně ne."],
|
'cs' => ['Ne.', 'Rozhodně ne.'],
|
||||||
"ko" => ["아니요.", "절대 안 돼요."],
|
'ko' => ['아니요.', '절대 안 돼요.'],
|
||||||
"zh" => ["不。", "绝对不行。"]
|
'zh' => ['不。', '绝对不行。']
|
||||||
}
|
}.freeze
|
||||||
|
|
||||||
RATE_LIMIT = {
|
RATE_LIMIT = {
|
||||||
window: 60, # seconds
|
window: 60, # seconds
|
||||||
limit: 60 # requests per IP per window
|
limit: 60 # requests per IP per window
|
||||||
}
|
}.freeze
|
||||||
|
|
||||||
$requests = {}
|
$requests = {}
|
||||||
|
|
||||||
|
|
@ -53,8 +54,8 @@ helpers do
|
||||||
end
|
end
|
||||||
|
|
||||||
def log_to_journald(message)
|
def log_to_journald(message)
|
||||||
IO.popen(["/usr/bin/systemd-cat", "--identifier=noaas"], "w") { |io| io.puts message }
|
IO.popen(['/usr/bin/systemd-cat', '--identifier=noaas'], 'w') { |io| io.puts message }
|
||||||
rescue
|
rescue StandardError
|
||||||
puts message # fallback to stdout
|
puts message # fallback to stdout
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -87,9 +88,9 @@ helpers do
|
||||||
end
|
end
|
||||||
|
|
||||||
def preferred_language
|
def preferred_language
|
||||||
params["lang"] || request.env["HTTP_ACCEPT_LANGUAGE"].to_s.scan(/[a-z]{2}/).find do |lang|
|
[params['lang'], request.env['HTTP_ACCEPT_LANGUAGE'].to_s.scan(/[a-z]{2}/).first, 'en'].each do |lang|
|
||||||
NO_RESPONSES.key?(lang)
|
return lang if NO_RESPONSES.key?(lang)
|
||||||
end || "en"
|
end || 'en'
|
||||||
end
|
end
|
||||||
|
|
||||||
def no_message(lang)
|
def no_message(lang)
|
||||||
|
|
@ -112,7 +113,7 @@ get '/' do
|
||||||
if rate_limited?
|
if rate_limited?
|
||||||
response = [{ status: 402, message: "I'm not paid enough for this." },
|
response = [{ status: 402, message: "I'm not paid enough for this." },
|
||||||
{ status: 418, message: "I'm just a teapot." },
|
{ status: 418, message: "I'm just a teapot." },
|
||||||
{ status: 429, message: "Not so fast!"} ].sample
|
{ status: 429, message: 'Not so fast!' }].sample
|
||||||
|
|
||||||
status response[:status]
|
status response[:status]
|
||||||
content_type :json
|
content_type :json
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
gem 'sinatra'
|
gem 'sinatra'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'sinatra'
|
require 'sinatra'
|
||||||
require 'json'
|
require 'json'
|
||||||
|
|
||||||
|
|
@ -6,254 +8,254 @@ set :port, 4567
|
||||||
PHRASES = [
|
PHRASES = [
|
||||||
# English Phrases
|
# English Phrases
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Formal",
|
style: 'Formal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "I'm afraid I must decline, but thank you for asking."
|
phrase: "I'm afraid I must decline, but thank you for asking."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Informal",
|
style: 'Informal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "Nah, but I appreciate it!"
|
phrase: 'Nah, but I appreciate it!'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Blunt",
|
style: 'Blunt',
|
||||||
tone: "Impolite",
|
tone: 'Impolite',
|
||||||
phrase: "Nope. Not interested."
|
phrase: 'Nope. Not interested.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Sarcastic",
|
style: 'Sarcastic',
|
||||||
tone: "Impolite",
|
tone: 'Impolite',
|
||||||
phrase: "Oh sure, let me cancel everything for *that*."
|
phrase: 'Oh sure, let me cancel everything for *that*.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Apologetic",
|
style: 'Apologetic',
|
||||||
tone: "Empathetic",
|
tone: 'Empathetic',
|
||||||
phrase: "I'm so sorry, but I really can't manage this right now."
|
phrase: "I'm so sorry, but I really can't manage this right now."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Professional",
|
style: 'Professional',
|
||||||
tone: "Neutral",
|
tone: 'Neutral',
|
||||||
phrase: "After careful consideration, I must respectfully decline."
|
phrase: 'After careful consideration, I must respectfully decline.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Witty",
|
style: 'Witty',
|
||||||
tone: "Playful",
|
tone: 'Playful',
|
||||||
phrase: "I'd love to, but my schedule is already having a midlife crisis."
|
phrase: "I'd love to, but my schedule is already having a midlife crisis."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Overexplained",
|
style: 'Overexplained',
|
||||||
tone: "Anxious",
|
tone: 'Anxious',
|
||||||
phrase: "I've thought about this for hours, analyzed every possible angle, and I just can't see a way to make this work."
|
phrase: "I've thought about this for hours, analyzed every possible angle, and I just can't see a way to make this work."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Dramatic",
|
style: 'Dramatic',
|
||||||
tone: "Emotional",
|
tone: 'Emotional',
|
||||||
phrase: "The universe is conspiring to prevent me from saying yes!"
|
phrase: 'The universe is conspiring to prevent me from saying yes!'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "English",
|
language: 'English',
|
||||||
style: "Cryptic",
|
style: 'Cryptic',
|
||||||
tone: "Mysterious",
|
tone: 'Mysterious',
|
||||||
phrase: "Some things are not meant to be, and this is one of them."
|
phrase: 'Some things are not meant to be, and this is one of them.'
|
||||||
},
|
},
|
||||||
|
|
||||||
# French Phrases
|
# French Phrases
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Formal",
|
style: 'Formal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "Je suis désolé, mais je dois refuser poliment."
|
phrase: 'Je suis désolé, mais je dois refuser poliment.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Informal",
|
style: 'Informal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "Non merci, pas aujourd'hui."
|
phrase: "Non merci, pas aujourd'hui."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Blunt",
|
style: 'Blunt',
|
||||||
tone: "Impolite",
|
tone: 'Impolite',
|
||||||
phrase: "Non. C'est tout."
|
phrase: "Non. C'est tout."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Sarcastic",
|
style: 'Sarcastic',
|
||||||
tone: "Impolite",
|
tone: 'Impolite',
|
||||||
phrase: "Ah oui, bien sûr... Et pendant qu'on y est!"
|
phrase: "Ah oui, bien sûr... Et pendant qu'on y est!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Poetic",
|
style: 'Poetic',
|
||||||
tone: "Refined",
|
tone: 'Refined',
|
||||||
phrase: "Hélas, mon cœur doit décliner votre proposition."
|
phrase: 'Hélas, mon cœur doit décliner votre proposition.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Diplomatic",
|
style: 'Diplomatic',
|
||||||
tone: "Neutral",
|
tone: 'Neutral',
|
||||||
phrase: "Je comprends votre proposition, mais je ne peux pas accepter."
|
phrase: 'Je comprends votre proposition, mais je ne peux pas accepter.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Dramatic",
|
style: 'Dramatic',
|
||||||
tone: "Emotional",
|
tone: 'Emotional',
|
||||||
phrase: "Mon Dieu! C'est absolument impossible!"
|
phrase: "Mon Dieu! C'est absolument impossible!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Philosophical",
|
style: 'Philosophical',
|
||||||
tone: "Reflective",
|
tone: 'Reflective',
|
||||||
phrase: "Les circonstances de la vie me poussent à refuser."
|
phrase: 'Les circonstances de la vie me poussent à refuser.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Witty",
|
style: 'Witty',
|
||||||
tone: "Playful",
|
tone: 'Playful',
|
||||||
phrase: "Mon agenda et moi sommes en pleine négociation, et la réponse est non."
|
phrase: 'Mon agenda et moi sommes en pleine négociation, et la réponse est non.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "French",
|
language: 'French',
|
||||||
style: "Overexplained",
|
style: 'Overexplained',
|
||||||
tone: "Anxious",
|
tone: 'Anxious',
|
||||||
phrase: "J'ai passé des heures à réfléchir, et franchement, c'est un non catégorique."
|
phrase: "J'ai passé des heures à réfléchir, et franchement, c'est un non catégorique."
|
||||||
},
|
},
|
||||||
|
|
||||||
# Japanese Phrases
|
# Japanese Phrases
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Formal",
|
style: 'Formal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "申し訳ありませんが、お断りさせていただきます。"
|
phrase: '申し訳ありませんが、お断りさせていただきます。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Informal",
|
style: 'Informal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "ごめん、ちょっと無理かも。"
|
phrase: 'ごめん、ちょっと無理かも。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Cold",
|
style: 'Cold',
|
||||||
tone: "Impolite",
|
tone: 'Impolite',
|
||||||
phrase: "無理です。以上。"
|
phrase: '無理です。以上。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Humble",
|
style: 'Humble',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "誠に恐縮ですが、お断りさせていただきます。"
|
phrase: '誠に恐縮ですが、お断りさせていただきます。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Indirect",
|
style: 'Indirect',
|
||||||
tone: "Diplomatic",
|
tone: 'Diplomatic',
|
||||||
phrase: "少し難しい状況でして..."
|
phrase: '少し難しい状況でして...'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Apologetic",
|
style: 'Apologetic',
|
||||||
tone: "Empathetic",
|
tone: 'Empathetic',
|
||||||
phrase: "本当に申し訳ありません。"
|
phrase: '本当に申し訳ありません。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Poetic",
|
style: 'Poetic',
|
||||||
tone: "Refined",
|
tone: 'Refined',
|
||||||
phrase: "心の中で、静かに拒絶の花が咲きます。"
|
phrase: '心の中で、静かに拒絶の花が咲きます。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Dramatic",
|
style: 'Dramatic',
|
||||||
tone: "Emotional",
|
tone: 'Emotional',
|
||||||
phrase: "天と地が、この申し出を許しません!"
|
phrase: '天と地が、この申し出を許しません!'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Cryptic",
|
style: 'Cryptic',
|
||||||
tone: "Mysterious",
|
tone: 'Mysterious',
|
||||||
phrase: "運命は別の道を示しています。"
|
phrase: '運命は別の道を示しています。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Japanese",
|
language: 'Japanese',
|
||||||
style: "Overexplained",
|
style: 'Overexplained',
|
||||||
tone: "Anxious",
|
tone: 'Anxious',
|
||||||
phrase: "深く考えた末、どうしても受け入れられない理由が山ほどあります。"
|
phrase: '深く考えた末、どうしても受け入れられない理由が山ほどあります。'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Sign Language Conceptual Variations
|
# Sign Language Conceptual Variations
|
||||||
{
|
{
|
||||||
language: "Sign Language",
|
language: 'Sign Language',
|
||||||
style: "Formal",
|
style: 'Formal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "Respectful decline with a gentle head shake and apologetic facial expression."
|
phrase: 'Respectful decline with a gentle head shake and apologetic facial expression.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Sign Language",
|
language: 'Sign Language',
|
||||||
style: "Blunt",
|
style: 'Blunt',
|
||||||
tone: "Impolite",
|
tone: 'Impolite',
|
||||||
phrase: "Sharp, abrupt hand wave signaling absolute rejection."
|
phrase: 'Sharp, abrupt hand wave signaling absolute rejection.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Sign Language",
|
language: 'Sign Language',
|
||||||
style: "Dramatic",
|
style: 'Dramatic',
|
||||||
tone: "Emotional",
|
tone: 'Emotional',
|
||||||
phrase: "Exaggerated full-body 'No' with wide eyes and dramatic hand gesture."
|
phrase: "Exaggerated full-body 'No' with wide eyes and dramatic hand gesture."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Sign Language",
|
language: 'Sign Language',
|
||||||
style: "Playful",
|
style: 'Playful',
|
||||||
tone: "Humorous",
|
tone: 'Humorous',
|
||||||
phrase: "Cheeky wink followed by a playful 'No' sign."
|
phrase: "Cheeky wink followed by a playful 'No' sign."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Sign Language",
|
language: 'Sign Language',
|
||||||
style: "Subtle",
|
style: 'Subtle',
|
||||||
tone: "Diplomatic",
|
tone: 'Diplomatic',
|
||||||
phrase: "Soft, almost imperceptible head tilt with a nuanced hand movement."
|
phrase: 'Soft, almost imperceptible head tilt with a nuanced hand movement.'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Emoji Communication
|
# Emoji Communication
|
||||||
{
|
{
|
||||||
language: "Emoji",
|
language: 'Emoji',
|
||||||
style: "Formal",
|
style: 'Formal',
|
||||||
tone: "Polite",
|
tone: 'Polite',
|
||||||
phrase: "🙇♀️🚫 (Bowing apologetically with a stop sign)"
|
phrase: '🙇♀️🚫 (Bowing apologetically with a stop sign)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Emoji",
|
language: 'Emoji',
|
||||||
style: "Casual",
|
style: 'Casual',
|
||||||
tone: "Impolite",
|
tone: 'Impolite',
|
||||||
phrase: "🙅♂️😤 (Crossed arms with frustrated face)"
|
phrase: '🙅♂️😤 (Crossed arms with frustrated face)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Emoji",
|
language: 'Emoji',
|
||||||
style: "Dramatic",
|
style: 'Dramatic',
|
||||||
tone: "Emotional",
|
tone: 'Emotional',
|
||||||
phrase: "😱🚫🌋 (Shocked face, stop sign, volcano)"
|
phrase: '😱🚫🌋 (Shocked face, stop sign, volcano)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Emoji",
|
language: 'Emoji',
|
||||||
style: "Witty",
|
style: 'Witty',
|
||||||
tone: "Playful",
|
tone: 'Playful',
|
||||||
phrase: "🤷♀️🤦♂️😂 (Shrug, facepalm, laughing)"
|
phrase: '🤷♀️🤦♂️😂 (Shrug, facepalm, laughing)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
language: "Emoji",
|
language: 'Emoji',
|
||||||
style: "Cryptic",
|
style: 'Cryptic',
|
||||||
tone: "Mysterious",
|
tone: 'Mysterious',
|
||||||
phrase: "🕳️🔮❌ (Hole, crystal ball, cancel)"
|
phrase: '🕳️🔮❌ (Hole, crystal ball, cancel)'
|
||||||
}
|
}
|
||||||
]
|
].freeze
|
||||||
|
|
||||||
# Method to find phrases by language or style
|
# Method to find phrases by language or style
|
||||||
def find_phrases(language: nil, style: nil)
|
def find_phrases(language: nil, style: nil)
|
||||||
|
|
@ -270,7 +272,7 @@ end
|
||||||
|
|
||||||
# Method to find most dramatic phrases
|
# Method to find most dramatic phrases
|
||||||
def dramatic_phrases
|
def dramatic_phrases
|
||||||
find_phrases(style: "Dramatic")
|
find_phrases(style: 'Dramatic')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Method to get unique languages
|
# Method to get unique languages
|
||||||
|
|
@ -286,17 +288,18 @@ get '/' do
|
||||||
format = params['format'] || 'json'
|
format = params['format'] || 'json'
|
||||||
|
|
||||||
filtered = PHRASES.select do |phrase|
|
filtered = PHRASES.select do |phrase|
|
||||||
(language.nil? || phrase[:language].casecmp(language) == 0) &&
|
(language.nil? || phrase[:language].casecmp(language).zero?) &&
|
||||||
(style.nil? || phrase[:style].casecmp(style) == 0) &&
|
(style.nil? || phrase[:style].casecmp(style).zero?) &&
|
||||||
(tone.nil? || phrase[:tone].casecmp(tone) == 0)
|
(tone.nil? || phrase[:tone].casecmp(tone).zero?)
|
||||||
end
|
end
|
||||||
|
|
||||||
case format
|
case format
|
||||||
when 'html'
|
when 'html'
|
||||||
content_type :html
|
content_type :html
|
||||||
"<ul>" + filtered.map { |p| "<li><strong>#{p[:language]}</strong> (#{p[:style]}, #{p[:tone]}): #{p[:phrase]}</li>" }.join + "</ul>"
|
'<ul>' + filtered.map { |p|
|
||||||
|
"<li><strong>#{p[:language]}</strong> (#{p[:style]}, #{p[:tone]}): #{p[:phrase]}</li>"
|
||||||
|
}.join + '</ul>'
|
||||||
else
|
else
|
||||||
JSON.pretty_generate(filtered)
|
JSON.pretty_generate(filtered)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
503
languages.rb
503
languages.rb
|
|
@ -1,327 +1,328 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
NO = {
|
NO = {
|
||||||
en: {
|
en: {
|
||||||
language: "English",
|
language: 'English',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "No." },
|
{ context: :simple, phrase: 'No.' },
|
||||||
{ context: :formal, phrase: "I’m afraid I must decline." },
|
{ context: :formal, phrase: 'I’m afraid I must decline.' },
|
||||||
{ context: :informal, phrase: "Nope." },
|
{ context: :informal, phrase: 'Nope.' },
|
||||||
{ context: :humorous, phrase: "Not in a million years!" },
|
{ context: :humorous, phrase: 'Not in a million years!' },
|
||||||
{ context: :indirect, phrase: "I don’t think that’s going to work." },
|
{ context: :indirect, phrase: 'I don’t think that’s going to work.' },
|
||||||
{ context: :emphatic, phrase: "Absolutely not." },
|
{ context: :emphatic, phrase: 'Absolutely not.' },
|
||||||
{ context: :business, phrase: "Unfortunately, that’s not feasible at this time." },
|
{ context: :business, phrase: 'Unfortunately, that’s not feasible at this time.' },
|
||||||
{ context: :friendship, phrase: "Sorry, not today!" },
|
{ context: :friendship, phrase: 'Sorry, not today!' },
|
||||||
{ context: :family, phrase: "Maybe another time." },
|
{ context: :family, phrase: 'Maybe another time.' },
|
||||||
{ context: :spicy, phrase: "Hell no!" },
|
{ context: :spicy, phrase: 'Hell no!' },
|
||||||
{ context: :offensive, phrase: "Not a chance in hell." },
|
{ context: :offensive, phrase: 'Not a chance in hell.' },
|
||||||
{ context: :very_offensive, phrase: "F*** no!" },
|
{ context: :very_offensive, phrase: 'F*** no!' },
|
||||||
{ context: :shady, phrase: "I can't help you with that." }
|
{ context: :shady, phrase: "I can't help you with that." }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
zh: {
|
zh: {
|
||||||
language: "中文",
|
language: '中文',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "不" },
|
{ context: :simple, phrase: '不' },
|
||||||
{ context: :formal, phrase: "很抱歉,我无法同意。" },
|
{ context: :formal, phrase: '很抱歉,我无法同意。' },
|
||||||
{ context: :informal, phrase: "不行!" },
|
{ context: :informal, phrase: '不行!' },
|
||||||
{ context: :humorous, phrase: "做梦吧!" },
|
{ context: :humorous, phrase: '做梦吧!' },
|
||||||
{ context: :indirect, phrase: "恐怕不行。" },
|
{ context: :indirect, phrase: '恐怕不行。' },
|
||||||
{ context: :emphatic, phrase: "绝对不行!" },
|
{ context: :emphatic, phrase: '绝对不行!' },
|
||||||
{ context: :business, phrase: "很遗憾,这不可行。" },
|
{ context: :business, phrase: '很遗憾,这不可行。' },
|
||||||
{ context: :friendship, phrase: "今天不行哦。" },
|
{ context: :friendship, phrase: '今天不行哦。' },
|
||||||
{ context: :family, phrase: "下次吧。" },
|
{ context: :family, phrase: '下次吧。' },
|
||||||
{ context: :spicy, phrase: "想都别想!" },
|
{ context: :spicy, phrase: '想都别想!' },
|
||||||
{ context: :offensive, phrase: "别烦我!" },
|
{ context: :offensive, phrase: '别烦我!' },
|
||||||
{ context: :very_offensive, phrase: "滚开!" },
|
{ context: :very_offensive, phrase: '滚开!' },
|
||||||
{ context: :shady, phrase: "我不掺和。" }
|
{ context: :shady, phrase: '我不掺和。' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
hi: {
|
hi: {
|
||||||
language: "हिन्दी",
|
language: 'हिन्दी',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "नहीं" },
|
{ context: :simple, phrase: 'नहीं' },
|
||||||
{ context: :formal, phrase: "माफ़ कीजिए, यह संभव नहीं है।" },
|
{ context: :formal, phrase: 'माफ़ कीजिए, यह संभव नहीं है।' },
|
||||||
{ context: :informal, phrase: "बिल्कुल नहीं!" },
|
{ context: :informal, phrase: 'बिल्कुल नहीं!' },
|
||||||
{ context: :humorous, phrase: "सपनों में ही हो सकता है!" },
|
{ context: :humorous, phrase: 'सपनों में ही हो सकता है!' },
|
||||||
{ context: :indirect, phrase: "मुझे नहीं लगता कि यह हो सकता है।" },
|
{ context: :indirect, phrase: 'मुझे नहीं लगता कि यह हो सकता है।' },
|
||||||
{ context: :emphatic, phrase: "कभी नहीं!" },
|
{ context: :emphatic, phrase: 'कभी नहीं!' },
|
||||||
{ context: :business, phrase: "क्षमा करें, यह संभव नहीं है।" },
|
{ context: :business, phrase: 'क्षमा करें, यह संभव नहीं है।' },
|
||||||
{ context: :friendship, phrase: "आज नहीं यार।" },
|
{ context: :friendship, phrase: 'आज नहीं यार।' },
|
||||||
{ context: :family, phrase: "शायद बाद में।" },
|
{ context: :family, phrase: 'शायद बाद में।' },
|
||||||
{ context: :spicy, phrase: "कभी नहीं!" },
|
{ context: :spicy, phrase: 'कभी नहीं!' },
|
||||||
{ context: :offensive, phrase: "दफा हो जाओ!" },
|
{ context: :offensive, phrase: 'दफा हो जाओ!' },
|
||||||
{ context: :very_offensive, phrase: "भाग जाओ यहाँ से!" },
|
{ context: :very_offensive, phrase: 'भाग जाओ यहाँ से!' },
|
||||||
{ context: :shady, phrase: "मैं इसमें शामिल नहीं हूँ।" }
|
{ context: :shady, phrase: 'मैं इसमें शामिल नहीं हूँ।' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
es: {
|
es: {
|
||||||
language: "Español",
|
language: 'Español',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "No." },
|
{ context: :simple, phrase: 'No.' },
|
||||||
{ context: :formal, phrase: "Lamento informarle que no es posible." },
|
{ context: :formal, phrase: 'Lamento informarle que no es posible.' },
|
||||||
{ context: :informal, phrase: "¡Ni loco!" },
|
{ context: :informal, phrase: '¡Ni loco!' },
|
||||||
{ context: :humorous, phrase: "¡Ni en sueños!" },
|
{ context: :humorous, phrase: '¡Ni en sueños!' },
|
||||||
{ context: :indirect, phrase: "No creo que sea posible." },
|
{ context: :indirect, phrase: 'No creo que sea posible.' },
|
||||||
{ context: :emphatic, phrase: "¡De ninguna manera!" },
|
{ context: :emphatic, phrase: '¡De ninguna manera!' },
|
||||||
{ context: :business, phrase: "Desafortunadamente, no podemos aceptar." },
|
{ context: :business, phrase: 'Desafortunadamente, no podemos aceptar.' },
|
||||||
{ context: :friendship, phrase: "Hoy no, amigo." },
|
{ context: :friendship, phrase: 'Hoy no, amigo.' },
|
||||||
{ context: :family, phrase: "Quizás después." },
|
{ context: :family, phrase: 'Quizás después.' },
|
||||||
{ context: :spicy, phrase: "¡Ni de coña!" },
|
{ context: :spicy, phrase: '¡Ni de coña!' },
|
||||||
{ context: :offensive, phrase: "¡Ni en pedo!" },
|
{ context: :offensive, phrase: '¡Ni en pedo!' },
|
||||||
{ context: :very_offensive, phrase: "¡Ni cagando!" },
|
{ context: :very_offensive, phrase: '¡Ni cagando!' },
|
||||||
{ context: :shady, phrase: "Eso no se puede hacer aquí." }
|
{ context: :shady, phrase: 'Eso no se puede hacer aquí.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
ar: {
|
ar: {
|
||||||
language: "العربية",
|
language: 'العربية',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "لا" },
|
{ context: :simple, phrase: 'لا' },
|
||||||
{ context: :formal, phrase: "عذرًا، لا يمكنني الموافقة." },
|
{ context: :formal, phrase: 'عذرًا، لا يمكنني الموافقة.' },
|
||||||
{ context: :informal, phrase: "مستحيل!" },
|
{ context: :informal, phrase: 'مستحيل!' },
|
||||||
{ context: :humorous, phrase: "في الأحلام فقط!" },
|
{ context: :humorous, phrase: 'في الأحلام فقط!' },
|
||||||
{ context: :indirect, phrase: "أخشى أن هذا غير ممكن." },
|
{ context: :indirect, phrase: 'أخشى أن هذا غير ممكن.' },
|
||||||
{ context: :emphatic, phrase: "مستحيل تمامًا!" },
|
{ context: :emphatic, phrase: 'مستحيل تمامًا!' },
|
||||||
{ context: :business, phrase: "للأسف، لا يمكننا تلبية الطلب." },
|
{ context: :business, phrase: 'للأسف، لا يمكننا تلبية الطلب.' },
|
||||||
{ context: :friendship, phrase: "ليس اليوم، آسف." },
|
{ context: :friendship, phrase: 'ليس اليوم، آسف.' },
|
||||||
{ context: :family, phrase: "ربما لاحقًا." },
|
{ context: :family, phrase: 'ربما لاحقًا.' },
|
||||||
{ context: :spicy, phrase: "ولا في الأحلام!" },
|
{ context: :spicy, phrase: 'ولا في الأحلام!' },
|
||||||
{ context: :offensive, phrase: "انسى الموضوع!" },
|
{ context: :offensive, phrase: 'انسى الموضوع!' },
|
||||||
{ context: :very_offensive, phrase: "روح من وجهي!" },
|
{ context: :very_offensive, phrase: 'روح من وجهي!' },
|
||||||
{ context: :shady, phrase: "هذا ليس من شأني." }
|
{ context: :shady, phrase: 'هذا ليس من شأني.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
fr: {
|
fr: {
|
||||||
language: "Français",
|
language: 'Français',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Non." },
|
{ context: :simple, phrase: 'Non.' },
|
||||||
{ context: :formal, phrase: "Je suis au regret de devoir refuser." },
|
{ context: :formal, phrase: 'Je suis au regret de devoir refuser.' },
|
||||||
{ context: :informal, phrase: "Nan." },
|
{ context: :informal, phrase: 'Nan.' },
|
||||||
{ context: :humorous, phrase: "Même pas en rêve !" },
|
{ context: :humorous, phrase: 'Même pas en rêve !' },
|
||||||
{ context: :indirect, phrase: "Je ne pense pas que ce soit possible." },
|
{ context: :indirect, phrase: 'Je ne pense pas que ce soit possible.' },
|
||||||
{ context: :emphatic, phrase: "Absolument pas." },
|
{ context: :emphatic, phrase: 'Absolument pas.' },
|
||||||
{ context: :business, phrase: "Malheureusement, ce n'est pas envisageable." },
|
{ context: :business, phrase: "Malheureusement, ce n'est pas envisageable." },
|
||||||
{ context: :friendship, phrase: "Pas aujourd'hui, désolé !" },
|
{ context: :friendship, phrase: "Pas aujourd'hui, désolé !" },
|
||||||
{ context: :family, phrase: "Une autre fois, peut-être." },
|
{ context: :family, phrase: 'Une autre fois, peut-être.' },
|
||||||
{ context: :spicy, phrase: "Pas question !" },
|
{ context: :spicy, phrase: 'Pas question !' },
|
||||||
{ context: :offensive, phrase: "Va te faire voir !" },
|
{ context: :offensive, phrase: 'Va te faire voir !' },
|
||||||
{ context: :very_offensive, phrase: "Va te faire foutre !" },
|
{ context: :very_offensive, phrase: 'Va te faire foutre !' },
|
||||||
{ context: :shady, phrase: "On ne fait pas ça ici." }
|
{ context: :shady, phrase: 'On ne fait pas ça ici.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
bn: {
|
bn: {
|
||||||
language: "বাংলা",
|
language: 'বাংলা',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "না" },
|
{ context: :simple, phrase: 'না' },
|
||||||
{ context: :formal, phrase: "দুঃখিত, এটা সম্ভব নয়।" },
|
{ context: :formal, phrase: 'দুঃখিত, এটা সম্ভব নয়।' },
|
||||||
{ context: :informal, phrase: "না রে!" },
|
{ context: :informal, phrase: 'না রে!' },
|
||||||
{ context: :humorous, phrase: "স্বপ্নেও না!" },
|
{ context: :humorous, phrase: 'স্বপ্নেও না!' },
|
||||||
{ context: :indirect, phrase: "সম্ভব হবে না মনে হয়।" },
|
{ context: :indirect, phrase: 'সম্ভব হবে না মনে হয়।' },
|
||||||
{ context: :emphatic, phrase: "একেবারেই না!" },
|
{ context: :emphatic, phrase: 'একেবারেই না!' },
|
||||||
{ context: :business, phrase: "দুঃখিত, এটা করা যাবে না।" },
|
{ context: :business, phrase: 'দুঃখিত, এটা করা যাবে না।' },
|
||||||
{ context: :friendship, phrase: "আজ না, বন্ধু।" },
|
{ context: :friendship, phrase: 'আজ না, বন্ধু।' },
|
||||||
{ context: :family, phrase: "পরের বার।" },
|
{ context: :family, phrase: 'পরের বার।' },
|
||||||
{ context: :spicy, phrase: "স্বপ্নেও না!" },
|
{ context: :spicy, phrase: 'স্বপ্নেও না!' },
|
||||||
{ context: :offensive, phrase: "দূর হ!" },
|
{ context: :offensive, phrase: 'দূর হ!' },
|
||||||
{ context: :very_offensive, phrase: "চলে যা এখান থেকে!" },
|
{ context: :very_offensive, phrase: 'চলে যা এখান থেকে!' },
|
||||||
{ context: :shady, phrase: "আমি এই ব্যাপারে নেই।" }
|
{ context: :shady, phrase: 'আমি এই ব্যাপারে নেই।' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
pt: {
|
pt: {
|
||||||
language: "Português",
|
language: 'Português',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Não." },
|
{ context: :simple, phrase: 'Não.' },
|
||||||
{ context: :formal, phrase: "Lamento, mas não é possível." },
|
{ context: :formal, phrase: 'Lamento, mas não é possível.' },
|
||||||
{ context: :informal, phrase: "Nem pensar!" },
|
{ context: :informal, phrase: 'Nem pensar!' },
|
||||||
{ context: :humorous, phrase: "Nem sonhando!" },
|
{ context: :humorous, phrase: 'Nem sonhando!' },
|
||||||
{ context: :indirect, phrase: "Acho que não vai dar." },
|
{ context: :indirect, phrase: 'Acho que não vai dar.' },
|
||||||
{ context: :emphatic, phrase: "De jeito nenhum!" },
|
{ context: :emphatic, phrase: 'De jeito nenhum!' },
|
||||||
{ context: :business, phrase: "Infelizmente, não será possível." },
|
{ context: :business, phrase: 'Infelizmente, não será possível.' },
|
||||||
{ context: :friendship, phrase: "Hoje não rola." },
|
{ context: :friendship, phrase: 'Hoje não rola.' },
|
||||||
{ context: :family, phrase: "Talvez depois." },
|
{ context: :family, phrase: 'Talvez depois.' },
|
||||||
{ context: :spicy, phrase: "Nem ferrando!" },
|
{ context: :spicy, phrase: 'Nem ferrando!' },
|
||||||
{ context: :offensive, phrase: "Tá maluco?" },
|
{ context: :offensive, phrase: 'Tá maluco?' },
|
||||||
{ context: :very_offensive, phrase: "Nem fodendo!" },
|
{ context: :very_offensive, phrase: 'Nem fodendo!' },
|
||||||
{ context: :shady, phrase: "Aqui não dá pra fazer isso." }
|
{ context: :shady, phrase: 'Aqui não dá pra fazer isso.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
ru: {
|
ru: {
|
||||||
language: "Русский",
|
language: 'Русский',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Нет." },
|
{ context: :simple, phrase: 'Нет.' },
|
||||||
{ context: :formal, phrase: "К сожалению, я вынужден отказать." },
|
{ context: :formal, phrase: 'К сожалению, я вынужден отказать.' },
|
||||||
{ context: :informal, phrase: "Нетушки!" },
|
{ context: :informal, phrase: 'Нетушки!' },
|
||||||
{ context: :humorous, phrase: "Только во сне!" },
|
{ context: :humorous, phrase: 'Только во сне!' },
|
||||||
{ context: :indirect, phrase: "Я думаю, это невозможно." },
|
{ context: :indirect, phrase: 'Я думаю, это невозможно.' },
|
||||||
{ context: :emphatic, phrase: "Ни за что!" },
|
{ context: :emphatic, phrase: 'Ни за что!' },
|
||||||
{ context: :business, phrase: "К сожалению, это невозможно." },
|
{ context: :business, phrase: 'К сожалению, это невозможно.' },
|
||||||
{ context: :friendship, phrase: "Сегодня не получится." },
|
{ context: :friendship, phrase: 'Сегодня не получится.' },
|
||||||
{ context: :family, phrase: "Может, потом." },
|
{ context: :family, phrase: 'Может, потом.' },
|
||||||
{ context: :spicy, phrase: "Да ни в жизнь!" },
|
{ context: :spicy, phrase: 'Да ни в жизнь!' },
|
||||||
{ context: :offensive, phrase: "Отвали!" },
|
{ context: :offensive, phrase: 'Отвали!' },
|
||||||
{ context: :very_offensive, phrase: "Пошёл на хрен!" },
|
{ context: :very_offensive, phrase: 'Пошёл на хрен!' },
|
||||||
{ context: :shady, phrase: "Я в это не лезу." }
|
{ context: :shady, phrase: 'Я в это не лезу.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
ur: {
|
ur: {
|
||||||
language: "اردو",
|
language: 'اردو',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "نہیں" },
|
{ context: :simple, phrase: 'نہیں' },
|
||||||
{ context: :formal, phrase: "معاف کیجئے، یہ ممکن نہیں۔" },
|
{ context: :formal, phrase: 'معاف کیجئے، یہ ممکن نہیں۔' },
|
||||||
{ context: :informal, phrase: "ہرگز نہیں!" },
|
{ context: :informal, phrase: 'ہرگز نہیں!' },
|
||||||
{ context: :humorous, phrase: "خواب میں بھی نہیں!" },
|
{ context: :humorous, phrase: 'خواب میں بھی نہیں!' },
|
||||||
{ context: :indirect, phrase: "مجھے نہیں لگتا کہ یہ ممکن ہے۔" },
|
{ context: :indirect, phrase: 'مجھے نہیں لگتا کہ یہ ممکن ہے۔' },
|
||||||
{ context: :emphatic, phrase: "کبھی نہیں!" },
|
{ context: :emphatic, phrase: 'کبھی نہیں!' },
|
||||||
{ context: :business, phrase: "معذرت، یہ ممکن نہیں۔" },
|
{ context: :business, phrase: 'معذرت، یہ ممکن نہیں۔' },
|
||||||
{ context: :friendship, phrase: "آج نہیں یار۔" },
|
{ context: :friendship, phrase: 'آج نہیں یار۔' },
|
||||||
{ context: :family, phrase: "شاید بعد میں۔" },
|
{ context: :family, phrase: 'شاید بعد میں۔' },
|
||||||
{ context: :spicy, phrase: "خواب میں بھی نہیں!" },
|
{ context: :spicy, phrase: 'خواب میں بھی نہیں!' },
|
||||||
{ context: :offensive, phrase: "دفع ہو جاؤ!" },
|
{ context: :offensive, phrase: 'دفع ہو جاؤ!' },
|
||||||
{ context: :very_offensive, phrase: "نکل جاؤ یہاں سے!" },
|
{ context: :very_offensive, phrase: 'نکل جاؤ یہاں سے!' },
|
||||||
{ context: :shady, phrase: "میں اس میں شامل نہیں ہوں۔" }
|
{ context: :shady, phrase: 'میں اس میں شامل نہیں ہوں۔' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
id: {
|
id: {
|
||||||
language: "Bahasa Indonesia",
|
language: 'Bahasa Indonesia',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Tidak." },
|
{ context: :simple, phrase: 'Tidak.' },
|
||||||
{ context: :formal, phrase: "Maaf, saya tidak bisa." },
|
{ context: :formal, phrase: 'Maaf, saya tidak bisa.' },
|
||||||
{ context: :informal, phrase: "Nggak." },
|
{ context: :informal, phrase: 'Nggak.' },
|
||||||
{ context: :humorous, phrase: "Mimpi aja dulu!" },
|
{ context: :humorous, phrase: 'Mimpi aja dulu!' },
|
||||||
{ context: :indirect, phrase: "Sepertinya tidak bisa." },
|
{ context: :indirect, phrase: 'Sepertinya tidak bisa.' },
|
||||||
{ context: :emphatic, phrase: "Sama sekali tidak!" },
|
{ context: :emphatic, phrase: 'Sama sekali tidak!' },
|
||||||
{ context: :business, phrase: "Sayangnya, itu tidak memungkinkan." },
|
{ context: :business, phrase: 'Sayangnya, itu tidak memungkinkan.' },
|
||||||
{ context: :friendship, phrase: "Bukan hari ini, bro." },
|
{ context: :friendship, phrase: 'Bukan hari ini, bro.' },
|
||||||
{ context: :family, phrase: "Mungkin nanti." },
|
{ context: :family, phrase: 'Mungkin nanti.' },
|
||||||
{ context: :spicy, phrase: "Jangan harap!" },
|
{ context: :spicy, phrase: 'Jangan harap!' },
|
||||||
{ context: :offensive, phrase: "Lupakan saja!" },
|
{ context: :offensive, phrase: 'Lupakan saja!' },
|
||||||
{ context: :very_offensive, phrase: "Pergi sana!" },
|
{ context: :very_offensive, phrase: 'Pergi sana!' },
|
||||||
{ context: :shady, phrase: "Gua nggak ikut campur." }
|
{ context: :shady, phrase: 'Gua nggak ikut campur.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
de: {
|
de: {
|
||||||
language: "Deutsch",
|
language: 'Deutsch',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Nein." },
|
{ context: :simple, phrase: 'Nein.' },
|
||||||
{ context: :formal, phrase: "Leider muss ich ablehnen." },
|
{ context: :formal, phrase: 'Leider muss ich ablehnen.' },
|
||||||
{ context: :informal, phrase: "Nö." },
|
{ context: :informal, phrase: 'Nö.' },
|
||||||
{ context: :humorous, phrase: "Nicht mal im Traum!" },
|
{ context: :humorous, phrase: 'Nicht mal im Traum!' },
|
||||||
{ context: :indirect, phrase: "Ich glaube, das wird nichts." },
|
{ context: :indirect, phrase: 'Ich glaube, das wird nichts.' },
|
||||||
{ context: :emphatic, phrase: "Auf keinen Fall!" },
|
{ context: :emphatic, phrase: 'Auf keinen Fall!' },
|
||||||
{ context: :business, phrase: "Das ist derzeit leider nicht möglich." },
|
{ context: :business, phrase: 'Das ist derzeit leider nicht möglich.' },
|
||||||
{ context: :friendship, phrase: "Heute nicht, sorry." },
|
{ context: :friendship, phrase: 'Heute nicht, sorry.' },
|
||||||
{ context: :family, phrase: "Vielleicht später." },
|
{ context: :family, phrase: 'Vielleicht später.' },
|
||||||
{ context: :spicy, phrase: "Kommt gar nicht in Frage!" },
|
{ context: :spicy, phrase: 'Kommt gar nicht in Frage!' },
|
||||||
{ context: :offensive, phrase: "Vergiss es!" },
|
{ context: :offensive, phrase: 'Vergiss es!' },
|
||||||
{ context: :very_offensive, phrase: "Leck mich!" },
|
{ context: :very_offensive, phrase: 'Leck mich!' },
|
||||||
{ context: :shady, phrase: "Das läuft hier nicht." }
|
{ context: :shady, phrase: 'Das läuft hier nicht.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
ja: {
|
ja: {
|
||||||
language: "日本語",
|
language: '日本語',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "いいえ" },
|
{ context: :simple, phrase: 'いいえ' },
|
||||||
{ context: :formal, phrase: "申し訳ありませんが、できません。" },
|
{ context: :formal, phrase: '申し訳ありませんが、できません。' },
|
||||||
{ context: :informal, phrase: "だめ" },
|
{ context: :informal, phrase: 'だめ' },
|
||||||
{ context: :humorous, phrase: "夢の中だけですね。" },
|
{ context: :humorous, phrase: '夢の中だけですね。' },
|
||||||
{ context: :indirect, phrase: "ちょっと難しいですね。" },
|
{ context: :indirect, phrase: 'ちょっと難しいですね。' },
|
||||||
{ context: :emphatic, phrase: "絶対に無理です。" },
|
{ context: :emphatic, phrase: '絶対に無理です。' },
|
||||||
{ context: :business, phrase: "申し訳ありませんが、ご要望にはお応えできません。" },
|
{ context: :business, phrase: '申し訳ありませんが、ご要望にはお応えできません。' },
|
||||||
{ context: :friendship, phrase: "今日は無理だよ。" },
|
{ context: :friendship, phrase: '今日は無理だよ。' },
|
||||||
{ context: :family, phrase: "また今度ね。" },
|
{ context: :family, phrase: 'また今度ね。' },
|
||||||
{ context: :spicy, phrase: "絶対ダメ!" },
|
{ context: :spicy, phrase: '絶対ダメ!' },
|
||||||
{ context: :offensive, phrase: "ふざけんな!" },
|
{ context: :offensive, phrase: 'ふざけんな!' },
|
||||||
{ context: :very_offensive, phrase: "消えろ!" },
|
{ context: :very_offensive, phrase: '消えろ!' },
|
||||||
{ context: :shady, phrase: "それはできない。" }
|
{ context: :shady, phrase: 'それはできない。' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
sv: {
|
sv: {
|
||||||
language: "Svenska",
|
language: 'Svenska',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Nej." },
|
{ context: :simple, phrase: 'Nej.' },
|
||||||
{ context: :formal, phrase: "Jag är ledsen, men jag måste tacka nej." },
|
{ context: :formal, phrase: 'Jag är ledsen, men jag måste tacka nej.' },
|
||||||
{ context: :informal, phrase: "Nä." },
|
{ context: :informal, phrase: 'Nä.' },
|
||||||
{ context: :humorous, phrase: "Inte ens i dina drömmar!" },
|
{ context: :humorous, phrase: 'Inte ens i dina drömmar!' },
|
||||||
{ context: :indirect, phrase: "Jag tror inte det går." },
|
{ context: :indirect, phrase: 'Jag tror inte det går.' },
|
||||||
{ context: :emphatic, phrase: "Absolut inte!" },
|
{ context: :emphatic, phrase: 'Absolut inte!' },
|
||||||
{ context: :business, phrase: "Tyvärr är det inte möjligt just nu." },
|
{ context: :business, phrase: 'Tyvärr är det inte möjligt just nu.' },
|
||||||
{ context: :friendship, phrase: "Inte idag, kompis." },
|
{ context: :friendship, phrase: 'Inte idag, kompis.' },
|
||||||
{ context: :family, phrase: "Kanske en annan gång." },
|
{ context: :family, phrase: 'Kanske en annan gång.' },
|
||||||
{ context: :spicy, phrase: "Aldrig i livet!" },
|
{ context: :spicy, phrase: 'Aldrig i livet!' },
|
||||||
{ context: :offensive, phrase: "Glöm det!" },
|
{ context: :offensive, phrase: 'Glöm det!' },
|
||||||
{ context: :very_offensive, phrase: "Dra åt helvete!" },
|
{ context: :very_offensive, phrase: 'Dra åt helvete!' },
|
||||||
{ context: :shady, phrase: "Jag vill inte vara inblandad." }
|
{ context: :shady, phrase: 'Jag vill inte vara inblandad.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
da: {
|
da: {
|
||||||
language: "Dansk",
|
language: 'Dansk',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Nej." },
|
{ context: :simple, phrase: 'Nej.' },
|
||||||
{ context: :formal, phrase: "Jeg er ked af det, men jeg må afslå." },
|
{ context: :formal, phrase: 'Jeg er ked af det, men jeg må afslå.' },
|
||||||
{ context: :informal, phrase: "Næ." },
|
{ context: :informal, phrase: 'Næ.' },
|
||||||
{ context: :humorous, phrase: "Ikke engang i dine drømme!" },
|
{ context: :humorous, phrase: 'Ikke engang i dine drømme!' },
|
||||||
{ context: :indirect, phrase: "Det tror jeg ikke, vi kan." },
|
{ context: :indirect, phrase: 'Det tror jeg ikke, vi kan.' },
|
||||||
{ context: :emphatic, phrase: "Aldrig i livet!" },
|
{ context: :emphatic, phrase: 'Aldrig i livet!' },
|
||||||
{ context: :business, phrase: "Desværre er det ikke muligt på nuværende tidspunkt." },
|
{ context: :business, phrase: 'Desværre er det ikke muligt på nuværende tidspunkt.' },
|
||||||
{ context: :friendship, phrase: "Ikke i dag, ven." },
|
{ context: :friendship, phrase: 'Ikke i dag, ven.' },
|
||||||
{ context: :family, phrase: "Måske en anden gang." },
|
{ context: :family, phrase: 'Måske en anden gang.' },
|
||||||
{ context: :spicy, phrase: "Aldrig nogensinde!" },
|
{ context: :spicy, phrase: 'Aldrig nogensinde!' },
|
||||||
{ context: :offensive, phrase: "Glem det!" },
|
{ context: :offensive, phrase: 'Glem det!' },
|
||||||
{ context: :very_offensive, phrase: "Skrid!" },
|
{ context: :very_offensive, phrase: 'Skrid!' },
|
||||||
{ context: :shady, phrase: "Det kan jeg ikke hjælpe med." }
|
{ context: :shady, phrase: 'Det kan jeg ikke hjælpe med.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
no: {
|
no: {
|
||||||
language: "Norsk",
|
language: 'Norsk',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Nei." },
|
{ context: :simple, phrase: 'Nei.' },
|
||||||
{ context: :formal, phrase: "Beklager, men jeg må takke nei." },
|
{ context: :formal, phrase: 'Beklager, men jeg må takke nei.' },
|
||||||
{ context: :informal, phrase: "Næi." },
|
{ context: :informal, phrase: 'Næi.' },
|
||||||
{ context: :humorous, phrase: "Ikke engang i dine drømmer!" },
|
{ context: :humorous, phrase: 'Ikke engang i dine drømmer!' },
|
||||||
{ context: :indirect, phrase: "Jeg tror ikke det lar seg gjøre." },
|
{ context: :indirect, phrase: 'Jeg tror ikke det lar seg gjøre.' },
|
||||||
{ context: :emphatic, phrase: "Absolutt ikke!" },
|
{ context: :emphatic, phrase: 'Absolutt ikke!' },
|
||||||
{ context: :business, phrase: "Dessverre er det ikke mulig nå." },
|
{ context: :business, phrase: 'Dessverre er det ikke mulig nå.' },
|
||||||
{ context: :friendship, phrase: "Ikke i dag, kompis." },
|
{ context: :friendship, phrase: 'Ikke i dag, kompis.' },
|
||||||
{ context: :family, phrase: "Kanskje en annen gang." },
|
{ context: :family, phrase: 'Kanskje en annen gang.' },
|
||||||
{ context: :spicy, phrase: "Aldri i livet!" },
|
{ context: :spicy, phrase: 'Aldri i livet!' },
|
||||||
{ context: :offensive, phrase: "Glem det!" },
|
{ context: :offensive, phrase: 'Glem det!' },
|
||||||
{ context: :very_offensive, phrase: "Dra til helvete!" },
|
{ context: :very_offensive, phrase: 'Dra til helvete!' },
|
||||||
{ context: :shady, phrase: "Det har jeg ikke noe med." }
|
{ context: :shady, phrase: 'Det har jeg ikke noe med.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
is: {
|
is: {
|
||||||
language: "Íslenska",
|
language: 'Íslenska',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Nei." },
|
{ context: :simple, phrase: 'Nei.' },
|
||||||
{ context: :formal, phrase: "Því miður verð ég að hafna þessu." },
|
{ context: :formal, phrase: 'Því miður verð ég að hafna þessu.' },
|
||||||
{ context: :informal, phrase: "Neibb." },
|
{ context: :informal, phrase: 'Neibb.' },
|
||||||
{ context: :humorous, phrase: "Ekki einu sinni í draumum þínum!" },
|
{ context: :humorous, phrase: 'Ekki einu sinni í draumum þínum!' },
|
||||||
{ context: :indirect, phrase: "Ég held að það gangi ekki." },
|
{ context: :indirect, phrase: 'Ég held að það gangi ekki.' },
|
||||||
{ context: :emphatic, phrase: "Aldrei!" },
|
{ context: :emphatic, phrase: 'Aldrei!' },
|
||||||
{ context: :business, phrase: "Því miður er það ekki hægt núna." },
|
{ context: :business, phrase: 'Því miður er það ekki hægt núna.' },
|
||||||
{ context: :friendship, phrase: "Ekki í dag, vinur." },
|
{ context: :friendship, phrase: 'Ekki í dag, vinur.' },
|
||||||
{ context: :family, phrase: "Kannski seinna." },
|
{ context: :family, phrase: 'Kannski seinna.' },
|
||||||
{ context: :spicy, phrase: "Aldrei á ævinni!" },
|
{ context: :spicy, phrase: 'Aldrei á ævinni!' },
|
||||||
{ context: :offensive, phrase: "Gleymdu því!" },
|
{ context: :offensive, phrase: 'Gleymdu því!' },
|
||||||
{ context: :very_offensive, phrase: "Farðu til fjandans!" },
|
{ context: :very_offensive, phrase: 'Farðu til fjandans!' },
|
||||||
{ context: :shady, phrase: "Ég ætla ekki að blanda mér í það." }
|
{ context: :shady, phrase: 'Ég ætla ekki að blanda mér í það.' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
fo: {
|
fo: {
|
||||||
language: "Føroyskt",
|
language: 'Føroyskt',
|
||||||
phrases: [
|
phrases: [
|
||||||
{ context: :simple, phrase: "Nei." },
|
{ context: :simple, phrase: 'Nei.' },
|
||||||
{ context: :formal, phrase: "Eg má tíverri nokta." },
|
{ context: :formal, phrase: 'Eg má tíverri nokta.' },
|
||||||
{ context: :informal, phrase: "Nei, ikki nú." },
|
{ context: :informal, phrase: 'Nei, ikki nú.' },
|
||||||
{ context: :humorous, phrase: "Ikki einu sinni í dreymum tín!" },
|
{ context: :humorous, phrase: 'Ikki einu sinni í dreymum tín!' },
|
||||||
{ context: :indirect, phrase: "Eg haldi ikki tað ber til." },
|
{ context: :indirect, phrase: 'Eg haldi ikki tað ber til.' },
|
||||||
{ context: :emphatic, phrase: "Aldri!" },
|
{ context: :emphatic, phrase: 'Aldri!' },
|
||||||
{ context: :business, phrase: "Tíverri er tað ikki gjørligt í løtuni." },
|
{ context: :business, phrase: 'Tíverri er tað ikki gjørligt í løtuni.' },
|
||||||
{ context: :friendship, phrase: "Ikki í dag, vinur." },
|
{ context: :friendship, phrase: 'Ikki í dag, vinur.' },
|
||||||
{ context: :family, phrase: "Kanska seinni." },
|
{ context: :family, phrase: 'Kanska seinni.' },
|
||||||
{ context: :spicy, phrase: "Aldri í lívinum!" },
|
{ context: :spicy, phrase: 'Aldri í lívinum!' },
|
||||||
{ context: :offensive, phrase: "Gloym tað!" },
|
{ context: :offensive, phrase: 'Gloym tað!' },
|
||||||
{ context: :very_offensive, phrase: "Far til helvitis!" },
|
{ context: :very_offensive, phrase: 'Far til helvitis!' },
|
||||||
{ context: :shady, phrase: "Tað vil eg ikki blanda meg í." }
|
{ context: :shady, phrase: 'Tað vil eg ikki blanda meg í.' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}.freeze
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue