完成多语言暂存

This commit is contained in:
dragon
2025-02-21 15:53:39 +08:00
parent bb20891098
commit b5c7cca944
26 changed files with 148 additions and 74 deletions

View File

@@ -112,7 +112,7 @@ body {
width: 9.62667rem;
height: 1.22667rem;
text-align: center;
margin: 0 auto 0;
margin: 9rem auto 0;
display: flex;
justify-content: space-around;
}
@@ -367,7 +367,7 @@ body {
width: 7.57333rem;
height: 1.4rem;
color: #FFED26;
font-size: 0.4rem;
font-size: 0.32rem;
font-weight: 600;
margin: 0.49333rem auto 0.37333rem;
line-height: 0.50667rem;
@@ -393,7 +393,7 @@ body {
.page1 .c .page1_1 .question .b span,
.page1 .c .page1_1 .question .c span {
color: #FFED26;
font-size: 0.37333rem;
font-size: 0.32rem;
font-weight: 600;
}
@@ -1588,7 +1588,8 @@ body {
}
.page2 .ramadanGifts .c .gifyBigBox .gift {
width: 19rem;
width: 20rem;
padding: 0 0.66667rem;
}
.page2 .ramadanGifts .c .gifyBigBox .gift .giftBox {
@@ -1598,7 +1599,7 @@ body {
background: url(../images/page3GiftBg.png) no-repeat;
background-size: 100% 100%;
position: relative;
margin-right: 0.52rem;
margin-right: 1.06667rem;
margin-top: 0.26667rem;
}
@@ -1642,14 +1643,16 @@ body {
}
.page2 .ramadanGifts .c .gifyBigBox .gift .giftBox span {
width: 100%;
width: 150%;
text-align: center;
color: #FFED26;
font-size: 0.37333rem;
font-size: 0.29333rem;
font-weight: 600;
position: absolute;
left: 0;
left: 50%;
transform: translateX(-50%);
bottom: -0.44rem;
display: block;
}
.page2 .ramadanGifts .b {
@@ -2368,3 +2371,15 @@ body {
.Turkiye .header .tab div span {
width: 2.78667rem;
}
.Turkiye .page2 .ramadanGifts .c .gifyBigBox .gift {
width: 21rem;
}
.Turkiye .page2 .ramadanGifts .c .gifyBigBox .gift .giftBox {
margin-right: 1.2rem;
}
.Turkiye .page1 .c .page1_2 .answering {
width: 7.5rem;
}

View File

@@ -117,7 +117,7 @@ body {
width: px2rem(722);
height: px2rem(92);
text-align: center;
margin: 0 auto 0;
margin: 9rem auto 0;
display: flex;
justify-content: space-around;
@@ -380,7 +380,7 @@ body {
width: px2rem(568);
height: px2rem(105);
color: #FFED26;
font-size: px2rem(30);
font-size: px2rem(24);
font-weight: 600;
margin: px2rem(37) auto px2rem(28);
line-height: px2rem(38);
@@ -404,7 +404,7 @@ body {
span {
color: #FFED26;
font-size: px2rem(28);
font-size: px2rem(24);
font-weight: 600;
}
@@ -1615,7 +1615,8 @@ body {
overflow-x: scroll;
.gift {
width: 19rem;
width: 20rem;
padding: 0 px2rem(50);
.giftBox {
float: left;
@@ -1624,7 +1625,7 @@ body {
background: url(../images/page3GiftBg.png) no-repeat;
background-size: 100% 100%;
position: relative;
margin-right: px2rem(39);
margin-right: px2rem(80);
margin-top: px2rem(20);
.sTitle {
@@ -1667,14 +1668,16 @@ body {
}
span {
width: 100%;
width: 150%;
text-align: center;
color: #FFED26;
font-size: px2rem(28);
font-size: px2rem(22);
font-weight: 600;
position: absolute;
left: 0;
left: 50%;
transform: translateX(-50%);
bottom: px2rem(-33);
display: block;
}
}
}
@@ -2419,4 +2422,13 @@ body {
.header .tab div span{
width: 2.78667rem;
}
.page2 .ramadanGifts .c .gifyBigBox .gift{
width: 21rem;
.giftBox{
margin-right: px2rem(90);
}
}
.page1 .c .page1_2 .answering{
width: 7.5rem;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 419 KiB

View File

@@ -20,7 +20,7 @@
<div class="time text2"></div>
<!-- 弹幕 -->
<div class="danmu">
<div class="danmu" style="display: none;">
<div id="my_container">
<!-- <div class="my_container_in">
<img src="./images/logo.png" alt="" class="tx">
@@ -110,22 +110,22 @@
<div class="rewars">
<div class="rewars1">
<span>3/3</span>
<img src="./images/page1_2_rewars.png" alt="">
<img src="./images/questionSheet1.png" alt="">
<div class="doneBut text11"></div>
</div>
<div class="rewars2">
<span>3/7</span>
<img src="./images/page1_2_rewars.png" alt="">
<img src="./images/questionSheet2.png" alt="">
<div class="doneBut text11"></div>
</div>
<div class="rewars3">
<span>3/15</span>
<img src="./images/page1_2_rewars.png" alt="">
<img src="./images/questionSheet3.png" alt="">
<div class="doneBut text11"></div>
</div>
<div class="rewars4">
<span>3/30</span>
<img src="./images/page1_2_rewars.png" alt="">
<img src="./images/questionSheet4.png" alt="">
<div class="doneBut text11"></div>
</div>
</div>
@@ -348,19 +348,34 @@
<div class="gifyBigBox">
<div class="gift">
<div class="giftBox">
<div class="sTitle cp">CP</div>
<img src="./images/logo.png" alt="" class="">
<span>Name</span>
<div class="sTitle cp text35"></div>
<img src="./images/ramadanLanterns.png" alt="" class="">
<span class="text36"></span>
</div>
<div class="giftBox ">
<div class="sTitle normal">Normal</div>
<img src="./images/logo.png" alt="" class="">
<span>Name</span>
<div class="sTitle normal text37"></div>
<img src="./images/ramadan.png" alt="" class="">
<span class="text38"></span>
</div>
<div class="giftBox ">
<div class="sTitle lucky">Lucky</div>
<img src="./images/logo.png" alt="" class="">
<span>Name</span>
<div class="sTitle lucky text39"></div>
<img src="./images/luckyLanterns.png" alt="" class="">
<span class="text40"></span>
</div>
<div class="giftBox ">
<div class="sTitle lucky text39"></div>
<img src="./images/holyQuran.png" alt="" class="">
<span class="text41"></span>
</div>
<div class="giftBox ">
<div class="sTitle normal text37"></div>
<img src="./images/eidCakes.png" alt="" class="">
<span class="text42"></span>
</div>
<div class="giftBox ">
<div class="sTitle normal text37"></div>
<img src="./images/fancyDinner.png" alt="" class="">
<span class="text43"></span>
</div>
</div>
</div>

View File

@@ -105,7 +105,7 @@ $(function () {
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();
blessGetConfig();
// blessGetConfig();
questionConfig();
}, 100)
})
@@ -144,7 +144,6 @@ function translateFun() {
$('.text30').html(langReplace(localLang.demoModule.text30));
$('.text31').html(langReplace(localLang.demoModule.text31));
$('.text32').html(langReplace(localLang.demoModule.text32));
$('.text33').html(langReplace(localLang.demoModule.text33));
$('.text34').html(langReplace(localLang.demoModule.text34));
$('.text35').html(langReplace(localLang.demoModule.text35));
$('.text36').html(langReplace(localLang.demoModule.text36));
@@ -152,6 +151,15 @@ function translateFun() {
$('.text38').html(langReplace(localLang.demoModule.text38));
$('.text39').html(langReplace(localLang.demoModule.text39));
$('.text40').html(langReplace(localLang.demoModule.text40));
$('.text41').html(langReplace(localLang.demoModule.text41));
$('.text42').html(langReplace(localLang.demoModule.text42));
$('.text43').html(langReplace(localLang.demoModule.text43));
$('.page2 .rewardsPub .rewardsPub_in .box img').attr("src",langReplace(localLang.demoModule.text45))
if (browser.ios) {
$('.text33').html(langReplace(localLang.demoModule.text33));
} else {
$('.text33').html(langReplace(localLang.demoModule.text34));
}
}
// 弹幕接口
function blessGetConfig() {
@@ -179,7 +187,7 @@ $('.header .tab div').click(function () {
var i = $(this).index() + 1;
$('.page1,.page2,.page3').hide();
$(this).addClass('act').siblings().removeClass('act');
$(`.page${i}`).show();
$(`.page${i}`).show();
})
// ===============================================页面一===============================================
// 问题列表接口
@@ -234,7 +242,7 @@ function questionConfig(dates) {
<img src="./images/ok.png" alt="" class="ok">
<img src="./images/notOk.png" alt="" class="notOk">
<div class="gift" style="display:${key == '2025-03-03' || key == '2025-03-07' || key == '2025-03-15' || key == '2025-03-30' ? 'block' : 'none'}">
<img src="./images/logo.png" alt="">
<img src="./images/${key == '2025-03-03' ? 'questionSheet1' : key == '2025-03-07' ? 'questionSheet2' : key == '2025-03-15' ? 'questionSheet3' : key == '2025-03-30' ? 'questionSheet4' : ''}.png" alt="">
</div>
</div>
`
@@ -272,9 +280,9 @@ function getQuestion(date) {
$('.questionLists').attr('date', date);
$('.page1 .c .page1_1 .question .answersNum b').text(res.data.rightAnswerNum);
$('.page1 .c .page1_1 .question .questionText').text(res.data.question);
$('.page1 .c .page1_1 .question .a span').text('A ' + res.data.optionA);
$('.page1 .c .page1_1 .question .b span').text('B ' + res.data.optionB);
$('.page1 .c .page1_1 .question .c span').text('C ' + res.data.optionC);
$('.page1 .c .page1_1 .question .a span').html('A &nbsp;&nbsp;' + res.data.optionA);
$('.page1 .c .page1_1 .question .b span').html('B &nbsp;&nbsp;' + res.data.optionB);
$('.page1 .c .page1_1 .question .c span').html('C &nbsp;&nbsp;' + res.data.optionC);
// 判断是否答题
if (res.data.answer) {
// 已答题
@@ -351,7 +359,7 @@ $('.page1 .lanternBox').on('click', '.buts', function () {
var date = $(this).attr('date');
var status = $(this).attr('status');
if (status == 0) {
toastMsg('还未到答题时间');
toastMsg(langReplace(localLang.demoModule.text44));
} else {
getQuestion(date)
}
@@ -466,30 +474,30 @@ function animationFun() {
// // ===============================================页面三===============================================
//tab切换
$('.page3 .list .c .page3_in1 .page3TabBox div').click(function () {
$('.page2 .list .c .page3_in1 .page3TabBox div').click(function () {
var i = $(this).index() + 1;
$(this).addClass('act').siblings().removeClass();
$('.page3 .list .c .page3_in1 .timeOutBox').css('display', 'none');
$('.page3 .list .c .page3_in1 .yesterdayCoinsPool').hide();
$('.page3 .list .c .page3_in1 .no1 .rewards').hide();
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'none');
$('.page2 .list .c .page3_in1 .yesterdayCoinsPool').hide();
$('.page2 .list .c .page3_in1 .no1 .rewards').hide();
if (i == 1) {
$('.page3 .list .c .page3_in1 .yesterdayCoinsPool').show();
$('.page2 .list .c .page3_in1 .yesterdayCoinsPool').show();
} else if (i == 2) {
$('.page3 .list .c .page3_in1 .timeOutBox').css('display', 'flex');
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'flex');
} else {
$('.page3 .list .c .page3_in1 .timeOutBox').css('display', 'flex');
$('.page3 .list .c .page3_in1 .no1 .rewards').show();
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'flex');
$('.page2 .list .c .page3_in1 .no1 .rewards').show();
}
})
// 打开弹窗奖励
$('.page3 .list .c .page3_in1 .no1 .rewards').click(function () {
$('.page3 .rewardsPub').show();
$('.page2 .list .c .page3_in1 .no1 .rewards').click(function () {
$('.page2 .rewardsPub').show();
bodyScroolFun(true);
})
// 关闭弹窗奖励
$('.page3 .rewardsPub .rewardsPub_in .close').click(function () {
$('.page3 .rewardsPub').hide();
$('.page2 .rewardsPub .rewardsPub_in .close').click(function () {
$('.page2 .rewardsPub').hide();
bodyScroolFun(false);
})

View File

@@ -39,12 +39,18 @@ langAr = {
text32: `المكافآت`,
text33: `هذا الحدث لا علاقة له بـ Apple.`,
text34: `هذا الحدث لا علاقة له بـ Google.`,
text35: ``,
text36: ``,
text37: ``,
text38: ``,
text39: ``,
text40: ``,
text35: `CP`,
text37: `عادي`,
text39: `محظوظ`,
text36: `فوانيس رمضان(3/1)`,
text38: `رمضان(3/1)`,
text40: `فوانيس الحظ(3/1)`,
text41: `القرآن الكريم(3/15)`,
text42: `كعكات العيد(3/30)`,
text43: `عشاء فاخر(3/30)`,
text44: `لم يحن وقت الإجابة بعد`,
text45: `./images/rewardsPage3-ar.png`,
text46: ``,
}
}

View File

@@ -44,11 +44,17 @@ langEn = {
text32: `Rewards`,
text33: `Event has nothing to do with Apple.`,
text34: `Event has nothing to do with Google.`,
text35: ``,
text36: ``,
text37: ``,
text38: ``,
text39: ``,
text40: ``,
text35: `CP`,
text36: `RamadanLanterns(3/1)`,
text37: `Normal`,
text38: `Ramadan(3/1)`,
text39: `Lucky`,
text40: `Lucky Lanterns(3/1)`,
text41: `Holy Quran(3/15)`,
text42: `Eid Cakes(3/30)`,
text43: `Fancy Dinner(3/30)`,
text44: `It is not yet time to answer`,
text45: `./images/rewardsPage3.png`,
text46: ``,
}
}

View File

@@ -39,12 +39,18 @@ langTr = {
text32: `Ödüller`,
text33: `Bu etkinlik Apple ile ilgili değildir.`,
text34: `Bu etkinlik Google ile ilgili değildir.`,
text35: ``,
text36: ``,
text37: ``,
text38: ``,
text39: ``,
text40: ``,
text35: `CP`,
text37: `Sıradan`,
text39: `Şanslı`,
text36: `Ramazan Fenerleri(3/1)`,
text38: `Ramazan(3/1)`,
text40: `Şans Fenerleri(3/1)`,
text41: `Kur'an-ı Kerim(3/15)`,
text42: `Bayram Pastaları(3/30)`,
text43: `Şık Akşam Yemeği(3/30)`,
text44: `Yanıt verme zamanı henüz gelmedi`,
text45: `./images/rewardsPage3-tr.png`,
text46: ``,
}
}

View File

@@ -39,12 +39,18 @@ langZh = {
text32: `獎勵`,
text33: `此活動與 Apple 無關。`,
text34: `此活動與 Google 無關。`,
text35: ``,
text36: ``,
text37: ``,
text38: ``,
text39: ``,
text40: ``,
text35: `CP`,
text36: `提灯(3/1)`,
text37: `普通`,
text38: `斋月(3/1)`,
text39: `幸运`,
text40: `幸运提灯(3/1)`,
text41: `古兰经(3/15)`,
text42: `开斋节蛋糕(3/30)`,
text43: `丰盛晚餐(3/30)`,
text44: `还未到答题时间`,
text45: `./images/rewardsPage3.png`,
text46: ``,
}