Skip to content

Commit ce4a51b

Browse files
gnpricePIG208
authored andcommitted
login [nfc]: Document need for "server URL" hint value to be reserved
1 parent fe4f2ef commit ce4a51b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

lib/widgets/login.dart

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ class AddAccountPage extends StatefulWidget {
115115
return _LoginSequenceRoute(page: const AddAccountPage());
116116
}
117117

118+
/// The hint text to show in the "Zulip server URL" input.
119+
///
120+
/// If this contains an example value, it must be one that has been reserved
121+
/// so that it cannot point to a real Zulip realm (nor any unknown other site).
122+
/// The realm name `your-org` under zulipchat.com is reserved for this reason.
123+
/// See discussion:
124+
/// https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/flutter.3A.20login.20URL/near/1570347
125+
// TODO(i18n): In principle this should be translated, because it's trying to
126+
// convey to the user the English phrase "your org". But doing that is
127+
// tricky because of the need to have the example name reserved.
128+
// Realistically that probably means we'll only ever translate this for
129+
// at most a handful of languages, most likely none.
130+
static const _serverUrlHint = 'your-org.zulipchat.com';
131+
118132
@override
119133
State<AddAccountPage> createState() => _AddAccountPageState();
120134
}
@@ -233,7 +247,7 @@ class _AddAccountPageState extends State<AddAccountPage> {
233247
labelText: zulipLocalizations.loginServerUrlLabel,
234248
errorText: errorText,
235249
helperText: kLayoutPinningHelperText,
236-
hintText: 'your-org.zulipchat.com')),
250+
hintText: AddAccountPage._serverUrlHint)),
237251
const SizedBox(height: 8),
238252
ElevatedButton(
239253
onPressed: !_inProgress && errorText == null

0 commit comments

Comments
 (0)