Skip to content

Commit

Permalink
Merge pull request #1 from softbie/dev-missons
Browse files Browse the repository at this point in the history
Перевод Missions.bb
  • Loading branch information
13Hz authored Sep 23, 2023
2 parents 814b2e4 + f79e140 commit 71afaed
Show file tree
Hide file tree
Showing 16 changed files with 3,444 additions and 3,030 deletions.
304 changes: 152 additions & 152 deletions Missions.bb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Прогресс**

![image](https://progress-bar.dev/40/?width=320&color=green&suffix=%)
![image](https://progress-bar.dev/55/?width=320&color=green&suffix=%)


Русификация игры [HardTime](http://www.mdickie.com/prev_hardtime.htm) от [MDickie](http://www.mdickie.com/)
Expand Down
2 changes: 1 addition & 1 deletion Values.bb
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ Function LoadTextures()
tMachine=LoadTexture("Weapons/Textures/Machine.png",4)
tPistol=LoadTexture("Weapons/Textures/Pistol.png",4)
;facial expressions
Loader(translate("Please Wait"),"Loading Expressions")
Loader(translate("Please Wait"),translate("Loading Expressions"))
tEars=LoadTexture("Characters/Expressions/Ears.JPG")
For count=1 To 3
tEyes(count)=LoadTexture("Characters/Expressions/Eyes0"+count+".JPG")
Expand Down
5 changes: 3 additions & 2 deletions translate_plugin/Main.bb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Global messagesCount = 1443
Global messagesCount = 1580
Dim messages$(messagesCount, 2)

Include "translate_plugin/lang/Others.bb"
Expand All @@ -10,4 +10,5 @@ Include "translate_plugin/lang/Texts.bb"
Include "translate_plugin/lang/Crimes.bb"
Include "translate_plugin/lang/Promos.bb"
Include "translate_plugin/lang/Gameplay.bb"
Include "translate_plugin/lang/Players.bb"
Include "translate_plugin/lang/Players.bb"
Include "translate_plugin/lang/Missions.bb"
11 changes: 7 additions & 4 deletions translate_plugin/Translate.bb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ Include "translate_plugin/Main.bb"
; first - строка для замены ключа #FIRST#
; second - строка для замены ключа #SECOND#
; Возвращает строку с произведенными заменами, можно указать как два аргумента так и только один
Function replacement$(string$, firstReplace$ = "", secondReplace$ = "")
Function replacement$(string$, firstReplace$ = "", secondReplace$ = "", thirdReplace$ = "")
If Len(firstReplace$) > 0 Then
string$ = Replace$(string$, "#FIRST#", firstReplace$)
EndIf
If Len(secondReplace$) > 0 Then
string$ = Replace$(string$, "#SECOND#", secondReplace$)
EndIf
If Len(thirdReplace$) > 0 Then
string$ = Replace$(string$, "#THIRD#", thirdReplace$)
EndIf
Return string$
End Function

Expand All @@ -25,9 +28,9 @@ End Function
; first - строка для подстановки в ключ #FIRST#
; second - строка для подстановки в ключ #SECOND#
; Возвращает переведенную или оригинальную строку
Function translate$(title$, firstReplace$ = "", secondReplace$ = "")
Function translate$(title$, firstReplace$ = "", secondReplace$ = "", thirdReplace$ = "")
For i = 0 To messagesCount
If title$ = messages$(i, 0) Then Return replacement$(messages$(i, 1), firstReplace$, secondReplace$)
If title$ = messages$(i, 0) Then Return replacement$(messages$(i, 1), firstReplace$, secondReplace$, thirdReplace$)
Next
Return replacement$(title$, firstReplace$, secondReplace$)
Return replacement$(title$, firstReplace$, secondReplace$, thirdReplace$)
End Function
Loading

0 comments on commit 71afaed

Please sign in to comment.