Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ CREATE TABLE `groups` (
`say_no_time` int(11) DEFAULT '15',
`pay_time` int(11) DEFAULT '30',
`current_game` int(11) DEFAULT NULL,
`lang` enum('en','zh','hk','en_us','en_gb') NOT NULL DEFAULT 'en',
`lang` enum('en','zh','hk','en_us','en_gb','en_in') NOT NULL DEFAULT 'en',
`protest_mode` bit(1) DEFAULT b'1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Expand Down Expand Up @@ -155,4 +155,4 @@ ALTER TABLE `bans`
-- AUTO_INCREMENT for table `games`
--
ALTER TABLE `games`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64463;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64463;
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private static void sendResponse(TelegramBot bot, Message msg) {
new InlineKeyboardButton[]{new InlineKeyboardButton("English (HK)").callbackData("lang:en:" + uid)},
new InlineKeyboardButton[]{new InlineKeyboardButton("English (US)").callbackData("lang:en_us:" + uid)},
new InlineKeyboardButton[]{new InlineKeyboardButton("English (UK)").callbackData("lang:en_gb:" + uid)},
new InlineKeyboardButton[]{new InlineKeyboardButton("English (IN)").callbackData("lang:en_in:" + uid)},
new InlineKeyboardButton[]{new InlineKeyboardButton(Translation.get(DealBot.lang(gid)).CLOSE()).callbackData("lang:close:" + uid)}
)));
}
Expand Down
65 changes: 65 additions & 0 deletions src/main/java/me/lkp111138/dealbot/translation/IndianEnglish.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package me.lkp111138.dealbot.translation;

public class IndianEnglish extends HongKongEnglish {
public String PROPERTY_NAME(int index) {
switch (index) {
case 0:
return "Malabar Hill Road";
case 1:
return "Cumballa Hill Lane";
case 2:
return "Peddar Road Junction";
case 3:
return "Marine Drive Promenade";
case 4:
return "Breach Candy Bazaar";
case 5:
return "Malabar Hill Market";
case 6:
return "Tardeo Avenue";
case 7:
return "Parel Station Road";
case 8:
return "Dadar Market Street";
case 9:
return "Sewri Crossing";
case 10:
return "Wadala Bridge Road";
case 11:
return "Matunga Central Road";
case 12:
return "Kings Circle Junction";
case 13:
return "Dombivli Railway Colony";
case 14:
return "Thane Bazar Street";
case 15:
return "Mulund Toll Naka";
case 16:
return "Kanjurmarg Railway Colony";
case 17:
return "Ghatkopar Station Way";
case 18:
return "Vikhroli Housing Society";
case 19:
return "Bhandup Village";
case 20:
return "Powai Lake Promenade";
case 21:
return "Airoli Naka Chowk";
case 22:
return "Western Railway Terminus";
case 23:
return "Central Railway Terminus";
case 24:
return "Harbour Line Platform";
case 25:
return "Trans Harbour Ferry";
case 26:
return "B.E.S.T Bus Depot";
case 27:
return "Water Treatment Plant";
}
return "";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static Translation get(String lang) {
translations.put("hk", new HongKongChinese());
translations.put("en_us", new UnitedStatesEnglish());
translations.put("en_gb", new UnitedKingdomEnglish());
translations.put("en_in", new IndianEnglish());
}
return translations.getOrDefault(lang, fallback);
}
Expand Down