Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
54d03c5a
Commit
54d03c5a
authored
Jun 09, 2014
by
Felix Paul Kühne
Browse files
web intf: localize page title
parent
9ebbc97c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Resources/web/style.css
View file @
54d03c5a
...
...
@@ -61,7 +61,7 @@ div.main.drop {
}
.nav
:before
{
content
:
"
WiFi Upload
"
;
content
:
"
%%HTTP_UPLOAD%%
"
;
font-family
:
"Raleway"
,
"Helvetica Neue"
;
font-size
:
36px
;
line-height
:
60px
;
...
...
Sources/VLCHTTPConnection.m
View file @
54d03c5a
...
...
@@ -104,8 +104,7 @@
NSString
*
documentRoot
=
[
config
documentRoot
];
NSString
*
relativePath
=
[
filePath
substringFromIndex
:[
documentRoot
length
]];
if
([
relativePath
isEqualToString
:
@"/index.html"
])
{
if
([
relativePath
isEqualToString
:
@"/index.html"
])
{
NSArray
*
allFiles
=
[
MLFile
allFiles
];
NSString
*
fileList
=
@""
;
for
(
MLFile
*
file
in
allFiles
)
{
...
...
@@ -113,17 +112,24 @@
fileList
=
[
fileList
stringByAppendingString
:
fileHTML
];
}
NSMutableDictionary
*
replacementDict
=
[
NSMutableDictionary
new
];
[
replacementDict
setObject
:
fileList
forKey
:
@"FILES"
];
[
replacementDict
setObject
:
NSLocalizedString
(
@"WEBINTF_DROPFILES"
,
nil
)
forKey
:
@"WEBINTF_DROPFILES"
];
[
replacementDict
setObject
:
NSLocalizedString
(
@"WEBINTF_DROPFILES_LONG"
,
nil
)
forKey
:
@"WEBINTF_DROPFILES_LONG"
];
[
replacementDict
setObject
:
NSLocalizedString
(
@"WEBINTF_DOWNLOADFILES"
,
nil
)
forKey
:
@"WEBINTF_DOWNLOADFILES"
];
[
replacementDict
setObject
:
NSLocalizedString
(
@"WEBINTF_DOWNLOADFILES_LONG"
,
nil
)
forKey
:
@"WEBINTF_DOWNLOADFILES_LONG"
];
NSDictionary
*
replacementDict
=
@{
@"FILES"
:
fileList
,
@"WEBINTF_DROPFILES"
:
NSLocalizedString
(
@"WEBINTF_DROPFILES"
,
nil
),
@"WEBINTF_DROPFILES_LONG"
:
NSLocalizedString
(
@"WEBINTF_DROPFILES_LONG"
,
nil
),
@"WEBINTF_DOWNLOADFILES"
:
NSLocalizedString
(
@"WEBINTF_DOWNLOADFILES"
,
nil
),
@"WEBINTF_DOWNLOADFILES_LONG"
:
NSLocalizedString
(
@"WEBINTF_DOWNLOADFILES_LONG"
,
nil
)};
return
[[
HTTPDynamicFileResponse
alloc
]
initWithFilePath
:[
self
filePathForURI
:
path
]
forConnection:
self
separator:
@"%%"
replacementDictionary:
replacementDict
];
}
else
if
([
relativePath
isEqualToString
:
@"/style.css"
])
{
NSDictionary
*
replacementDict
=
@{
@"HTTP_UPLOAD"
:
NSLocalizedString
(
@"HTTP_UPLOAD"
,
nil
)};
return
[[
HTTPDynamicFileResponse
alloc
]
initWithFilePath
:[
self
filePathForURI
:
path
]
forConnection:
self
separator:
@"%%"
replacementDictionary:
replacementDict
];
}
return
[
super
httpResponseForMethod
:
method
URI
:
path
];
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment